If you want more of my pastes visit: https://randompaste.000webhostapp.com/index.html -------------------------------------------------------------------------------------- view my last post at: https://bitbin.it/N3VCFOzC/ -------------------------------------------------------------------------------------- //Basic CURL example // 1. Initialize $ch = curl_init(); // 2. Set Options // URL to send the request to curl_setopt($ch, CURLOPT_URL, 'https://www.mysportsfeeds.com/api/feed/pull/nhl/2017-playoff/scoreboard.json?fordate=20170416'); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Set method curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); // Return instead of outputting directly curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Set compression curl_setopt($ch, CURLOPT_ENCODING, "gzip"); // Set headers curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Basic " . base64_encode('user' . ":" . 'password') ]); // 3. Execute the request and fetch the response. Check for errors. $resp = curl_exec($ch); /* $gameScoreArray = $resp->scoreboard->gameScore; for ( $i=0; $i