Quote:
Originally Posted by gandalfwizard
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
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.'
__________________