Around line 97-108, you'll see:
Code:
$avimg = getImage("/avatars/$player");
if ($avimg)
{
$avatar_full = $avimg['url'];
}
else if ($avatar_full == '' || $playerdata['blockavatar'] == '1')
{
$avatar_full = IMAGE_PATH."/unknown.jpg";
}
if ($status == '')
$status = '(Unknown)';
echo("<img src=\"$avatar_full\" style=\"height:158px;width:158px;\" alt=\"Steam Community Avatar\" />");
Just before the echo, change $avatar_full to Steam's https URL:
Code:
$avimg = getImage("/avatars/$player");
if ($avimg)
{
$avatar_full = $avimg['url'];
}
else if ($avatar_full == '' || $playerdata['blockavatar'] == '1')
{
$avatar_full = IMAGE_PATH."/unknown.jpg";
}
if ($status == '')
$status = '(Unknown)';
$avatar_full = preg_replace("#(.+)/steamcommunity/public/images/avatars/(.+).jpg#", "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/$2.jpg", $avatar_full);
echo("<img src=\"$avatar_full\" style=\"height:158px;width:158px;\" alt=\"Steam Community Avatar\" />");
Steam has used multiple domain names, previously they were on "//media.steampowered.com", I mean to have seen them on "//cdn.akamai.steamstatic.com/" recently, but today they are on "//cdn.edgecast.steamstatic.com/".
With the above preg_replace, it is just changing the beginning of the URL, so any URL's will work given they match the Steam pattern.
This way "{ANYTHING_HERE}/steamcommunity/public/images/avatars/{ANYTHING_HERE}.jpg" will be adjusted to "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/{ANYTHING_HERE}.jpg".
__________________