Add this after the line $output = curl_exec($ch);:
$info = curl_getinfo($ch);
echo "<pre>";
print_r($info);
echo "</pre>";
and type here what you see in the browser, please. Without this information, people cannot help you.
, . HTTP 200, . : " " ( , ).
$info:
Array
(
[url] => http:
[content_type] => text/html; charset=UTF-8
[http_code] => 200
[header_size] => 927
[request_size] => 109
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.561
[namelookup_time] => 0.062
[connect_time] => 0.109
[pretransfer_time] => 0.109
[size_upload] => 0
[size_download] => 18266
[speed_download] => 32559
[speed_upload] => 0
[download_content_length] => 18266
[upload_content_length] => -1
[starttransfer_time] => 0.561
[redirect_time] => 0
[redirect_url] =>
[primary_ip] => 2.17.165.89
[certinfo] => Array
(
)
[primary_port] => 80
[local_ip] => 192.168.1.33
[local_port] => 53366
)
. , steamcommunity.com? [http_code] => 0, "".
, :
print_r($output);
, , JSON? , $json , .
:
302 HTTP- URL . URL-, JSON. :
$url = 'http://steamcommunity.com/profiles/<your 64-bit steam ID>/inventory/json/730/2';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
$info = curl_getinfo($ch);
curl_setopt($ch, CURLOPT_URL, $info["redirect_url"]);
$output = curl_exec($ch);
$json = json_decode($output, true);
print_r($json);