Author Topic: Steam Profile States Indicator  (Read 1329 times)

I made a small .php script that allows you to input your Steam64 ID and have it return a small image reflecting your current state.

Here is the URL: http://carbonweb.x10.mx/steam.php?id=YOUR_ID_HERE
Example: http://carbonweb.x10.mx/steam.php?id=76561198051141800

All of the current states:
- Offline
- Online
- Away
- Busy
- Looking to Play
- Looking to Trade
- Snooze

My State -



Not enough appreciation
0/10






I think online, away, and busy are pretty vague
it would probably be better to use colors, specifically green, yellow, and orange, respectively

and can you share the source code??

does it work with custom urls

I think online, away, and busy are pretty vague
it would probably be better to use colors, specifically green, yellow, and orange, respectively

and can you share the source code??

I've changed the online status to green. You should probably clear your cache with Ctrl-F5 to see it.

Here is the source code.

Code: [Select]
<?php
function clean($string) {
$string str_replace(' ''-'$string);

 
return preg_replace('/[^A-Za-z0-9\-]/'''$string);
}

$url "http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=(STEAM API KEY OMITTED)&steamids=".clean(htmlspecialchars($_GET["id"]))."&format=xml";
$get file_get_contents($url);
$xml simplexml_load_string($get);
$img './stonline/'.$xml->players->player->personastate.'.gif';
$fp fopen($img'rb');
header("Content-Type: image/gif");
header("Content-Length: ".filesize($img));
fpassthru($fp);
exit;
?>