Input
SteamID / FriendID / customURL:
Output
'; echo $ret; echo '
'; if ($_GET['s']!=='') { echo $notice; } echo ''; }else if (is_array($ret)){ echo '
Output
'; convert($ret['type'],$ret['data']); echo '
'; if ($_GET['s']!=='') { echo @$notice;} echo '
'; } function convert($type,$data){ switch($type){ case 'steamid': $main='http://steamcommunity.com/profiles/'.bcadd((($data['auth']*2)+$data['server']),'76561197960265728'); echo 'FriendID: '.bcadd((($data['auth']*2)+$data['server']),'76561197960265728').''; break; case 'friendid': if (substr($data,-1)%2==0) $server=0; else $server=1; $auth=bcsub($data,'76561197960265728'); if (bccomp($auth,'0')!=1) {echo "Error: invalid FriendID or SteamID";return;} $auth=bcsub($auth,$server); $auth=bcdiv($auth,2); echo "SteamID for VALVe's GoldSrc and Source Orange Box Engine games:
". 'STEAM_0:'.$server.':'.$auth; echo "

SteamID for VALVe's newer games:
". 'STEAM_1:'.$server.':'.$auth; break; } } function get_input_type($data){ $data=strtolower(trim($data)); if ($data!='') { if (strlen($data)>80) return "too long"; if (substr($data,0,7)=='steam_0' or substr($data,0,7)=='steam_1') { $tmp=explode(':',$data); if ((count($tmp)==3) && is_numeric($tmp[1]) && is_numeric($tmp[2])){ return array('type'=>'steamid','data'=>array('auth'=>$tmp[2],'server'=>$tmp[1])); }else{ return "Error: invalid SteamID"; } }else if ($p=strrpos($data,'/')){ $tmp=explode('/',$data); foreach ($tmp as $item){ if (is_numeric($item)){ $a=$item; break; } } if ((is_numeric($a)) && (preg_match('/7656119/', $a))) return array('type'=>'friendid','data'=>$a); else { $xml = @simplexml_load_file($data."?xml=1"); $steamid64=$xml->steamID64; if (!preg_match('/7656119/', $steamid64)) return "Error: invalid link"; else return array('type'=>'friendid','data'=>$steamid64); } }else if ((is_numeric($data)) && (preg_match('/7656119/', $data))){ return array('type'=>'friendid','data'=>$data); }else{ $xml = @simplexml_load_file("http://steamcommunity.com/id/".$data."?xml=1"); $steamid64=$xml->steamID64; if (!preg_match('/7656119/', $steamid64)) return "Error: invalid input"; else return array('type'=>'friendid','data'=>$steamid64); } }else{ return ""; } } ?>