I'm trying to get release data in JSON format via Discogs API, but it doesn't work. What am I doing wrong? This code works well with other URLs.
<?php
$opts = array('http' => array('method' => 'GET',
'header' => 'Accept-Encoding: gzip,
deflate\r\nUser-Agent: TheVinylCrate/1.0 +http://www.hazadus.net\r\n'));
$context = stream_context_create($opts);
echo file_get_contents('http://api.discogs.com/releases/4976693', false, $context);
?>
This will work. You don't need to add any option.