I tried the curl sample code from php.net on my local XAMPP V3.2.2 with all default settings, and changed the url to https://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote?format=json. The curl_exec returns empty string. However when I run the same code on production server, curl_exec returns proper string.
<?php
// create curl resource
$ch = curl_init();
// set url
curl_setopt($ch, CURLOPT_URL, "https://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote?format=json");
//return the transfer as a string
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output contains the output string
$output = curl_exec($ch);
// close curl resource to free up system resources
curl_close($ch);
?>