I checked and it looks like cURL is enabled inside the php.ini file (I'm using XAMPP) and yet it's still not displaying anything. Same thing goes for file_get_contents. I simply get a blank web page as a result...
<body>
<?php
$auth = base64_encode("04d2ac7f76a0fbc0eee9dc5ef96b9259:dc70ffc7ad911236bc2e0822855e2d42");
$context = stream_context_create(['http' => ['header' => "Authorization: Basic $auth"]]);
$homepage = file_get_contents("https://api.intrinio.com/companies?identifier=AA", false, $context );
$login = '04d2ac7f76a0fbc0eee9dc5ef96b9259';
$password = 'dc70ffc7ad911236bc2e0822855e2d42';
$url = 'https://api.intrinio.com/companies?identifier=AA';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "$login:$password");
$result = curl_exec($ch);
curl_close($ch);
echo($result);
?>
</body>
Anyone has an idea why? Thanks!