[php] create id

Viewer

copydownloadembedprintName: create id
  1. <?php
  2.  
  3. $requestbody = '{"agentid":"API68-02","account":"","password":"Aaaa1111"}';
  4.  
  5. $signaturekey= 'b6041a16-2ab2-4e26-bf66-c63d387e0ff3';
  6.  
  7. $hashdata = hash_hmac("sha256", $requestbody, $signaturekey, true);
  8.  
  9. $hash = base64_encode($hashdata);
  10.  
  11. $headerstring = 'hashkey: ' . $hash;
  12.  
  13. $headers = [
  14.         $headerstring
  15. ];
  16.  
  17. $url = 'http://xespublicapi.eznet88.com/player/create/';
  18. $ch = curl_init($url);
  19.  
  20. curl_setopt($ch, CURLOPT_POST, 1);
  21. curl_setopt($ch, CURLOPT_POSTFIELDS, $requestbody);
  22. curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
  23.  
  24. $response = curl_exec($ch);
  25. curl_close($ch);
  26.  
  27. ?>

Editor

You can edit this paste and save as new:


File Description
  • create id
  • Paste Code
  • 22 Oct-2020
  • 605 Bytes
You can Share it: