SHARE
TWEET

Untitled

a guest Nov 20th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $curl = curl_init();
  2.  
  3. curl_setopt_array($curl, array(
  4.   CURLOPT_URL => "https://www.thesportsdb.com/api/v1/json/1/searchteams.php?t=Arsenal",
  5.   CURLOPT_RETURNTRANSFER => true,
  6.   CURLOPT_ENCODING => "",
  7.   CURLOPT_MAXREDIRS => 10,
  8.   CURLOPT_TIMEOUT => 30,
  9.   CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  10.   CURLOPT_CUSTOMREQUEST => "GET",
  11.   CURLOPT_HTTPHEADER => array(
  12.     "Cache-Control: no-cache",
  13.   ),
  14. ));
  15.  
  16. $response = curl_exec($curl);
  17. $err = curl_error($curl);
  18.  
  19. curl_close($curl);
  20.  
  21. if ($err) {
  22.   echo "cURL Error #:" . $err;
  23. } else {
  24.   echo $response;
  25. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top