http://api.steampowered.com/ISteamNews/GetNewsForApp/V0001/?format=json&appid=440&count=3\r\n
я должен получить форму ответа .Так вот вопрос состоит в том как принять эту информацию
http://api.steampowered.com/ISteamNews/GetNewsForApp/V0001/?format=json&appid=440&count=3\r\n
$url = 'http://api.steampowered.com/ISteamNews/GetNewsForApp/V0001/?format=json&appid=440&count=3';
$return = file_get_contents($url);
Цитата (Kusss @ 28.12.2015 - 16:24) |
смотря какой ответ ты ждешь. |
$data = json_decode(file_get_contents('http://api.steampowered.com/ISteamNews/GetNewsForApp/V0001/?format=json&appid=440&count=3'), true);
foreach ($data['appnews']['newsitems']['newsitem'] as $key => $item) {
print_r($item);
//echo $item['title'];
//echo $item['contents'];
}