Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_FAILONERROR, false);
- curl_setopt($ch, CURLOPT_VERBOSE, 0);
- curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $this->apiToken, 'Content-Type: application/json'));
- curl_setopt($ch, CURLOPT_POSTFIELDS, '{
- "filters": {
- "ads": [],
- "adsources": [],
- "advertisers": [],
- "ad_sources": [],
- "ad_status": [],
- "browser": [],
- "country": [],
- "connection_buy_type": [],
- "creatives": [],
- "device": [],
- "formats": [],
- "insertions": [],
- "insertion_status": [],
- "operating_system": [],
- "packs": [],
- "page": [],
- "placements": [],
- "placement_status": [],
- "publishers": [],
- "scenarios": [],
- "websites": [],
- "date": {
- "start": "2019-05-29T00:00:00",
- "end": "2019-05-29T23:59:59",
- "timezone": "Europe/Paris"
- }
- },
- "dimensions": ["day", "website_domain", "page", "device"],
- "metrics": ["ssp_bidrequest", "impression", "hbSlotAvailable", "income", "click"],
- "emails": [],
- "format": "csv"
- }');
- $fileContent = curl_exec($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement