Advertisement
irokemr

xat.com api

Apr 8th, 2020
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. <?php
  2. // Creado por Jose89FCB
  3. $curl = curl_init();
  4.  
  5.  
  6. $XatNombre = $_GET[XatNombre];
  7. curl_setopt_array($curl, array(
  8. CURLOPT_URL => "https://xat.com/json/GroupSearch.php?s=$XatNombre",
  9. CURLOPT_RETURNTRANSFER => true,
  10. CURLOPT_ENCODING => "",
  11. CURLOPT_MAXREDIRS => 10,
  12. CURLOPT_TIMEOUT => 0,
  13. CURLOPT_FOLLOWLOCATION => false,
  14. CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  15. CURLOPT_CUSTOMREQUEST => "GET",
  16. CURLOPT_HTTPHEADER => array(
  17. "Authorization:"
  18. ),
  19. ));
  20.  
  21. $response = curl_exec($curl);
  22. $err = curl_error($curl);
  23.  
  24. curl_close($curl);
  25.  
  26. if ($err) {
  27. echo "cURL Error #:" . $err;
  28. } else {
  29. echo $response;
  30. } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement