How do I pull out a steam avatar?
Without authorization, can I pull out a user's picture ?
That is, the user is registered on the site.And already has a steam id.
Can I pull out a steam avatar by its steam ID? that is, it will not make an entry to steam.
1
1 answers
Nashol way who needs it:
XXXXXXXXXXXXXXXXXX - API KEY
$String = file_get_contents("http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=XXXXXXXXXXXXXXXXXX&steamids='.$friend[steam_id].'");
$new = $String; //Текст, который читается...
$newcr = ''; //Строка, которая будет выводится...
$newm = explode('",', $new); //Делим текст на слова...
$space = ' '; //А этим пробелом можно словать соединять... А ещё это можно будет поменять на любой другой символ...
$newcr = $newcr.$space.$newm[4]; //И пихаем все слова в одну строку...
$str = $newcr;
$str = str_replace(array('"avatarmedium": "'), '', $str);
$mail = trim(strrchr($str, ' '));
echo '<img src='.$mail.'></img>';
3
Author: Sauron, 2016-04-09 19:05:52