Advertisement
Guest User

Untitled

a guest
Nov 27th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.98 KB | None | 0 0
  1. <?php
  2. $username = "Nimrod";
  3.         $password = "Orco2010";
  4.         $url = "https://platform.trafficoni.com/api/pull/customers";
  5.         $key = "264388973aaa9b2f9eb2aa84a9c7382e";
  6.         $source_id=41;
  7.         $orderId = 252;
  8. $jsonObj = array(
  9.                             'from' => "2018-11-27 00:00:00",
  10.                             'to' => date('Y-m-d 23:59:59'),
  11.                             'type' => '3',
  12.                             "offset" => 0
  13.                             );        
  14.     $curl = curl_init($url);
  15.  
  16.                     curl_setopt_array($curl, array(
  17.                     CURLOPT_RETURNTRANSFER => 1,
  18.                     CURLOPT_POST => 1,
  19.                     CURLOPT_HTTPHEADER => array("x-trackbox-username:".$username, "x-trackbox-password:".$password, "x-api-key:".$key, "Content-type:application/json"),
  20.                     CURLOPT_POSTFIELDS => json_encode($jsonObj),
  21.                     ));
  22.                     $result = curl_exec($curl);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement