Raised This Month: $ Target: $400
 0% 

Convert STEAMID to Steam Community ID


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
willgtl
Junior Member
Join Date: Jan 2010
Old 04-26-2010 , 11:04   Re: Convert STEAMID to Steam Community ID
Reply With Quote #11

I'm a pretty big noob with PHP coding, maybe someone can figure out why this isn't working:

Code:
            $steamid = $row->steamId;
            $community_id = ((substr($steamid, 10)) * 2) + 76561197960265728 + (substr($steamid, 8, 1)); 
            $community_id = rtrim(sprintf("%f", $community_id), "0");
            $community_id = (string)$community_id;
            $community_id = str_replace(".", "", $community_id);

                echo '<a href="http://steamcommunity.com/profiles/'.$community_id.'">View SteamID Page</a>';
Using my SteamID (STEAM_0:0:16672270) it figures the community ID is 76561197993610272, which it isn't. Where did I go wrong?
willgtl is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:10.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode