Advertisement
irokemr

Api Fortnite (Shop)

Apr 17th, 2020
726
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <?php
  2.  
  3. // Creado por Jose89FCB
  4.  
  5. $curl = curl_init();
  6.  
  7.  
  8. curl_setopt_array($curl, array(
  9.  
  10.  
  11.  
  12. CURLOPT_URL => "https://fortnite-api.com/shop/br?language=es",
  13.  
  14. CURLOPT_RETURNTRANSFER => true,
  15.  
  16. CURLOPT_ENCODING => "",
  17.  
  18. CURLOPT_MAXREDIRS => 10,
  19.  
  20. CURLOPT_TIMEOUT => 0,
  21.  
  22. CURLOPT_FOLLOWLOCATION => false,
  23.  
  24. CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  25.  
  26. CURLOPT_CUSTOMREQUEST => "GET",
  27.  
  28. CURLOPT_HTTPHEADER => array(
  29.  
  30. "x-api-key: AQUI LA KEY"
  31.  
  32. ),
  33.  
  34. ));
  35.  
  36.  
  37. $response = curl_exec($curl);
  38.  
  39. $err = curl_error($curl);
  40.  
  41.  
  42. curl_close($curl);
  43.  
  44.  
  45. if ($err) {
  46.  
  47. echo "cURL Error #:" . $err;
  48.  
  49. } else {
  50.  
  51. echo $response;
  52.  
  53. } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement