rendered paste body<?php /* Original author: Steven Copyright 2009 found: http://forums.tizag.com/showthread.php?t=13830 adapted slightly by AttroPheed */// Remote XML URL and name of local copy for caching purposes// change 'attropheed' to your steam profile url$stm = 'http://steamcommunity.com/id/Jason-B?xml=1';$stmlocal = 'steam.xml';// Makes sure you're only hitting your XML feed every 2 minutesif( (!file_exists($stmlocal)) || (time() - filemtime($stmlocal) > 120) ){ $contents = file_get_contents($stm); $fp = fopen($stmlocal, "w"); fwrite($fp, $contents); fclose($fp);}$xml = simplexml_load_file($stmlocal);//Steam Status//goes through the local XML file and grabs the 'stateMessage' item.$gameinfo = $xml->stateMessage;// Strip line break tag cuz it's ugly and swap 'In-Game' for 'Playing'$gameinfo = str_replace("<br />", " ", "$gameinfo");$gameinfo = str_replace("In-Game", "Playing", "$gameinfo");$gameinfo = str_replace("...", "", "$gameinfo");$name = $xml->steamID;$name = str_replace("^1", "", "$name");$name = str_replace("^2", "", "$name");$name = str_replace("^3", "", "$name");$name = str_replace("^4", "", "$name");$name = str_replace("^5", "", "$name");$name = str_replace("^6", "", "$name");$name = str_replace("^7", "", "$name");$name = str_replace("^8", "", "$name");$name = str_replace("^9", "", "$name");$name = str_replace("^0", "", "$name");echo ($name . ' - ' . $gameinfo);?>