I'm relatively new to programming in all aspects, so please bear with me when asking stupid questions. I'd like to get the steam price histories of selected items through Steam's market API, which is easily accessible through my browser when I'm logged in Steam. Thing is, I'd like to do it through a server, which gets me the following error:
Warning: file_get_contents(http://steamcommunity.com/market/pricehistory/?currency=1&appid=440&market_hash_name=Specialized%20Killstreak%20Brass%20Beast): failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in PATH on line 16
Basically, my problem is the same as this guy's: How to retrieve steam market price history?, but his answers are for Python, and I really don't know anything about the Python language. If would like to do this in PHP, or if it's not possible in PHP I could use JavaScript.
I'm not asking for a code I can copy-paste, I'd be quite happy with anything to start with.
The code that I am trying to get to work:
// $page is the URL above
$json = json_decode(file_get_contents($page), true);
if($json["success"] == true OR !empty($json))
{
$results = $json["prices"];
foreach ($results as $result)
{
echo $result . "<br>";
}