CURL is returning junk CURL is returning junk curl curl

CURL is returning junk


config CURLOPT_ENCODING for curl, then it will be OK.

<?phpfunction curl($url) {    $ch = curl_init();  // Initialising cURL    curl_setopt($ch, CURLOPT_URL, $url);    // Setting cURL's URL option with the $url variable passed into the function    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); // Setting cURL's option to return the webpage data    curl_setopt($ch, CURLOPT_ENCODING ,"");    $data = curl_exec($ch); // Executing the cURL request and assigning the returned data to the $data variable    curl_close($ch);    // Closing cURL    return $data;   // Returning the data from the function}$output = curl('https://projects.fivethirtyeight.com/2017-mlb-predictions/games/');echo $output;?>