Advertisement
Guest User

Untitled

a guest
Dec 11th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.22 KB | None | 0 0
  1. $url = @$apiOptions['url']."/api/signup/procform"; //'https://network.traffologic.com/api/signup/procform';
  2.         $username = @$apiOptions['username'];
  3.         $password = @$apiOptions['password'];
  4.         $key = '264388973aaa9b2f9eb2aa84a9c7382e';
  5.         $ai = "2958013";
  6.         $ci = "1814";
  7.         $gi = "1159";
  8.         $so = "";
  9.  
  10.         $ipAddress = "2.116.238.149";
  11.  
  12.         $jsonObj = array(
  13.             'ai' => $ai,
  14.             'ci' => $ci,
  15.             'gi' => $gi,
  16.             'so' => $so,
  17.             'userip' => $ipAddress,
  18.             'firstname' => "Timis",
  19.             'lastname' => "Liviu",
  20.             'email' => "timisliviu@gmail.com",
  21.             'password' => '1q2w3e',
  22.             'phone' => "39756789873",
  23.         );
  24.  
  25.         $curl = curl_init($url);
  26.  
  27.         curl_setopt_array($curl, array(
  28.             CURLOPT_RETURNTRANSFER => 1,
  29.             CURLOPT_POST => 1,
  30.             CURLOPT_HTTPHEADER => array("x-trackbox-username:".$username, "x-trackbox-password:".$password, "x-api-key:".$key, "Content-type:application/json"),
  31.             CURLOPT_POSTFIELDS => json_encode($jsonObj, JSON_UNESCAPED_UNICODE),
  32.         ));
  33.  
  34.         $result = curl_exec($curl);
  35.  
  36.         if (FALSE === $result){
  37.             $result = curl_error($curl);
  38.         }
  39.  
  40. //        echo $result;
  41.         curl_close($curl);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement