Advertisement
ninhvanthang

EVN NPC API

Apr 22nd, 2020
1,280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.12 KB | None | 0 0
  1. <?php
  2.  
  3. $curl = curl_init();
  4.  
  5. curl_setopt_array($curl, array(
  6.   CURLOPT_URL => "http://appapiauth.cskh.npc.com.vn/api/v1/customerindex?code=xxxxxxxxxx&month=12&year=2019&size=24",
  7.   CURLOPT_RETURNTRANSFER => true,
  8.   CURLOPT_ENCODING => "",
  9.   CURLOPT_MAXREDIRS => 10,
  10.   CURLOPT_TIMEOUT => 0,
  11.   CURLOPT_FOLLOWLOCATION => true,
  12.   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  13.   CURLOPT_CUSTOMREQUEST => "GET",
  14.   CURLOPT_HTTPHEADER => array(
  15.     "accept: application/json;charset=UTF-8",
  16.     "accept-encoding: gzip",
  17.     "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOlsidGVzdGp3dHJldc291cmNlaWQiXSwiZXhwIjoxNTg3NTgzMjg5LCJ1c2VyX25hbWUiOiJQQTAxWVkwMDAwOTYxIiwianRpIjoiYjQ0N2FlZjAtNGU4My00YzhlLTg3Y2YtZThNDAzYjAyY2JlIiwiY2xpZW50X2lkIjoidGVzdGp3dGNsaWVudGlkIiwic2NvcGUiOlsicmVhZCIsIndyaXRlIl19.mXRCMF2bJpI3cdYhm9h63ckGpyy0F8TDbQC3z2jGu48",
  18.     "connection: Keep-Alive",
  19.     "content-type: application/x-www-form-urlencoded",
  20.     "host: appapiauth.cskh.npc.com.vn",
  21.     "user-agent: okhttp/3.8.0",
  22.     "x-channel-id: android"
  23.   ),
  24. ));
  25.  
  26. $response = curl_exec($curl);
  27.  
  28. curl_close($curl);
  29. echo $response;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement