Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
831 B
2
Indexable
Never
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://client-api.popaket.com/location/v1/cities?province_id=SdLQ8KONbg==&province_name=&city_name=Depok',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtc2lzZG4iOiIiLCJuYW1lIjoid2FvcmRlcmFqYSIsInVzZXJfY2F0ZWdvcnlfaWQiOjIwMCwiZXhwIjoxNjcyODIzNzk0LCJpYXQiOjE2NzI3MzczOTQsImlzcyI6IlBvcGFrZXRBdXRoIiwic3ViIjoiZjc1NTg4MGItZmM3OC00NjE4LWI0MTktYTdlZDkxNjY2Zjk0In0.S76p8PS3-j_LNb17lzv4NreD01Wz46vhM_T_yL7eO6g'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;