Raised This Month: $ Target: $400
 0% 

Admin Display from SB


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
8088
Veteran Member
Join Date: Jan 2008
Old 11-02-2010 , 20:51   Re: Admin Display from SB
Reply With Quote #11

Quote:
Originally Posted by gandalfwizard View Post
Yes, the following is happening on the add friends page,

steam://friends/add/76561.19799340108E+12
That's probably because of lack of support of 64 bit integers. A safer way would be to use BC Math, but not all shared hosts support this.
PHP Code:
function steam2friend($steam_id)
{
    
$steam_id=strtolower($steam_id);
    if (
substr($steam_id,0,7)=='steam_0')
    {
        
$tmp=explode(':',$steam_id);
        if ((
count($tmp)==3) && is_numeric($tmp[1]) && is_numeric($tmp[2]))
        {
            return 
bcadd((($tmp[2]*2)+$tmp[1]),'76561197960265728');
        }
        else return 
false;
    }
    else return 
false;
}

$community_id steam2friend($info['authid']); 
Or let MySQL do the math, like this.

Quote:
Originally Posted by gandalfwizard View Post
I assure you I am running the latest version of PHP, may I please ask you what process you use, to convert STEAM ID's to community ID's?
There's no such thing as 'the latest version.'
__________________
steamID converter with OpenSearch browser plugin
8088 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 21:13.


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