Advertisement
clickio

teads api error

May 31st, 2019
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. $ch = curl_init();
  2. curl_setopt($ch, CURLOPT_FAILONERROR, false);
  3. curl_setopt($ch, CURLOPT_VERBOSE, 0);
  4. curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
  5. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  6. curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer ' . $this->apiToken, 'Content-Type: application/json'));
  7.  
  8. curl_setopt($ch, CURLOPT_POSTFIELDS, '{
  9. "filters": {
  10. "ads": [],
  11. "adsources": [],
  12. "advertisers": [],
  13. "ad_sources": [],
  14. "ad_status": [],
  15. "browser": [],
  16. "country": [],
  17. "connection_buy_type": [],
  18. "creatives": [],
  19. "device": [],
  20. "formats": [],
  21. "insertions": [],
  22. "insertion_status": [],
  23. "operating_system": [],
  24. "packs": [],
  25. "page": [],
  26. "placements": [],
  27. "placement_status": [],
  28. "publishers": [],
  29. "scenarios": [],
  30. "websites": [],
  31. "date": {
  32. "start": "2019-05-29T00:00:00",
  33. "end": "2019-05-29T23:59:59",
  34. "timezone": "Europe/Paris"
  35. }
  36. },
  37. "dimensions": ["day", "website_domain", "page", "device"],
  38. "metrics": ["ssp_bidrequest", "impression", "hbSlotAvailable", "income", "click"],
  39. "emails": [],
  40. "format": "csv"
  41. }');
  42.  
  43. $fileContent = curl_exec($ch);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement