Advertisement
irokemr

api key fortniteapi.io

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