Guest User

Untitled

a guest
Nov 25th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. { "values": [[1511596680,3],[1511596740,2],[1511596800,0],[1511596860,6],[1511596920,0],[1511596980,0],[1511597040,0],[1511597100,0],[1511597160,0],[1511603220,0],[1511603280,0],[1511603340,0],[1511603400,0],[1511603460,0],[1511603520,0],[1511603580,0],[1511603640,0],[1511603700,0],[1511603760,0],[1511603820,0]]}
  2.  
  3. $contenttype = 'application/json';
  4.  
  5. $headers = array(
  6. 'Content-Type: ' . $contenttype,
  7. 'Content-Length: ' . strlen($post_string) /* this an empty string */
  8. );
  9.  
  10. /* dump of headers
  11.  
  12. Array
  13. (
  14. [0] => Content-Type: application/json
  15. [1] => Content-Length: 0
  16. )
  17. */
  18.  
  19. $ch = curl_init($url);
  20.  
  21. curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method); // this is get */
  22. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  23. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  24. if (is_array($headers)
  25. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  26. $output = curl_exec($ch); // this contains the crap at the start */
Add Comment
Please, Sign In to add comment