Noch eine Frage: Ich habe das ganze nun so, wie ich es haben möchte.
Wie kann ich nun den Median_Price aus dem Market abfragen?
Habe das ganze so gemacht:
PHP
foreach($result->rgDescriptions AS $item) {
//echo $item->market_name.'<br />';
$content2 = file_get_contents('http://steamcommunity.com/market/priceoverview/?currency=3&appid=730&market_hash_name='.$item->market_hash_name);
//$content2 = file_get_contents('http://steamcommunity.com/market/listings/730/'.$item->market_name);
$result2 = json_decode($content2);
if($result2 -> success !== true){
die("Fehler");
}
foreach($result2 -> median_price AS $mprice){
$state = $mprice;
}
$state = $result2 -> median_price;
echo "
<tr><td><img src='http://steamcommunity-a.akamaihd.net/economy/image/".$item->icon_url."' width='184' height='184' /></td>
<td><div style='font-color: '".$item->name_color."';'>".$item->market_name."</div></td>
<td>".$state."</td></tr>
";
}
Alles anzeigen
Allerdings bekomme ich folgende Fehler:
PHP
Warning: file_get_contents(http://steamcommunity.com/market/priceoverview/?currency=3&appid=730&market_hash_name=Chroma Case): failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error in D:\XAMPP\htdocs\steam\inventar.php on line 40
Notice: Trying to get property of non-object in D:\XAMPP\htdocs\steam\inventar.php on line 43
Fehler
