fadlyshafa

Untitled

May 12th, 2020
120
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $curl = curl_init();
  2.         curl_setopt_array($curl, array(
  3.             CURLOPT_URL => "https://idol.infinite-erp.co.id/infinite/org.openbravo.service.json.jsonrest/Locator",
  4.             CURLOPT_RETURNTRANSFER => true,
  5.             CURLOPT_ENCODING => "",
  6.             CURLOPT_MAXREDIRS => 10,
  7.             CURLOPT_TIMEOUT => 300,
  8.             CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  9.             CURLOPT_CUSTOMREQUEST => "PUT",
  10.             CURLOPT_POSTFIELDS => $orderHeaderUpdateJson,
  11.             CURLOPT_HTTPHEADER => array(
  12.                 'Content-Type:application/json',
  13.                 'Authorization: Basic '. 'YWRtaW4tZmFkb',
  14.                 ),
  15.             ));
  16.  
  17.         $response = curl_exec($curl);
  18.         $err = curl_error($curl);
  19.  
  20.         curl_close($curl);
  21.  
  22.         if ($err) {
  23.             echo "cURL Error #:" . $err;
  24.         } else {
  25.             $hasilKembali = json_decode($response);
  26.         }
RAW Paste Data