fadlyshafa

Untitled

Apr 14th, 2020
306
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $curl = curl_init();
  2.  
  3.         curl_setopt_array($curl, array(
  4.             CURLOPT_URL => "https://idol.infinite-erp.co.id/infinite/org.openbravo.service.json.jsonrest/MaterialMgmtInternalMovement?_where=documentNo='".str_replace(' ', '%20', $document_no)."'&_selectedProperties=id",
  5.             CURLOPT_RETURNTRANSFER => true,
  6.             CURLOPT_ENCODING => "",
  7.             CURLOPT_MAXREDIRS => 10,
  8.             CURLOPT_TIMEOUT => 300,
  9.             CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  10.             CURLOPT_CUSTOMREQUEST => "GET",
  11.             CURLOPT_HTTPHEADER => array(
  12.                 'Content-Type:application/json',
  13.                 'Authorization: Basic '. 'YWRtaW4tZmFkbHk6YXNhc2Fz',
  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.             $sel = json_decode($response);
  26.                     // dd($kota);
  27.         }
RAW Paste Data