Raised This Month: $51 Target: $400
 12% 

Convert STEAMID to Steam Community ID


Post New Thread Reply   
 
Thread Tools Display Modes
siosios
SourceMod Donor
Join Date: Jan 2008
Old 02-25-2009 , 20:36   Re: Convert STEAMID to Steam Community ID
Reply With Quote #141

works for me DN
__________________
siosios is offline
Maurice
Senior Member
Join Date: Nov 2006
Location: Netherlands
Old 02-25-2009 , 20:39   Re: Convert STEAMID to Steam Community ID
Reply With Quote #142

Quote:
Originally Posted by devicenull View Post
Why would yo do that when I just gave you a nice stored procedure to do it
Thanks all for the help and suggestions but none realy worked inside or together with the AMXBans script. I requested also some help on a special PHP help forum and together we created this algorithm.

$community_id = substr($player_id, 10);
$community_id *= 2;
$community_id += 76561197960265728;
$community_id += substr($player_id, 8, 1);

Again thanks for all the help and if someone want to add this feature also to AMXBans use the above small script.


Edit: Here everything into just one line.
$community_id = ((substr($player_id, 10)) * 2) + 76561197960265728 + (substr($player_id, 8, 1));
__________________
Luck? Luck is only one feeling of amazement concerning a seemingly incidental circumstance which one himself must create.

Last edited by Maurice; 02-26-2009 at 16:34.
Maurice is offline
Gizmo
Senior Member
Join Date: May 2006
Location: Sweden
Old 02-26-2009 , 03:07   Re: Convert STEAMID to Steam Community ID
Reply With Quote #143

Quote:
Originally Posted by devicenull View Post
Why would yo do that when I just gave you a nice stored procedure to do it
I could not get that to work :S
__________________
Gizmo is offline
voogru
Inspector Javert
Join Date: Oct 2004
Old 02-27-2009 , 01:50   Re: Convert STEAMID to Steam Community ID
Reply With Quote #144

Quote:
Originally Posted by devicenull View Post
Why would yo do that when I just gave you a nice stored procedure to do it
It seems that when creating a new stored procedure it can't be used because the user doesnt have access to execute it, from what I've seen on documents on the interwebs, you need root in order to grant privs for a stored procedure.

And since a lot of people use shared hosting, no dice.
voogru is offline
msleeper
Veteran Member
Join Date: May 2008
Location: Atlanta, Jawjuh
Old 02-28-2009 , 04:06   Re: Convert STEAMID to Steam Community ID
Reply With Quote #145

Why hasn't this thread been stickied yet.
__________________
msleeper is offline
voogru
Inspector Javert
Join Date: Oct 2004
Old 02-28-2009 , 18:09   Re: Convert STEAMID to Steam Community ID
Reply With Quote #146

I must not be worthy.
voogru is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 03-01-2009 , 03:59   Re: Convert STEAMID to Steam Community ID
Reply With Quote #147

Quote:
Originally Posted by Maurice View Post
Thanks all for the help and suggestions but none realy worked inside or together with the AMXBans script. I requested also some help on a special PHP help forum and together we created this algorithm.

$community_id = substr($player_id, 10);
$community_id *= 2;
$community_id += 76561197960265728;
$community_id += substr($player_id, 8, 1);

Again thanks for all the help and if someone want to add this feature also to AMXBans use the above small script.


Edit: Here everything into just one line.
$community_id = ((substr($player_id, 10)) * 2) + 76561197960265728 + (substr($player_id, 8, 1));
Which PHP version did you test that on? PHP 5 and lower only support 32-bit integers, so it can't have numbers higher than 429496729. Only PHP 6 (which is still alpha) and PHP 64-bit support numbers up to 18446744073709551615, but only when specifically giving them the int64 data type.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
msleeper
Veteran Member
Join Date: May 2008
Location: Atlanta, Jawjuh
Old 03-03-2009 , 22:28   Re: Convert STEAMID to Steam Community ID
Reply With Quote #148

Quote:
Originally Posted by voogru View Post
I must not be worthy.
Thread is now sticky. You're welcome. ;)
__________________
msleeper is offline
Maurice
Senior Member
Join Date: Nov 2006
Location: Netherlands
Old 03-11-2009 , 12:29   Re: Convert STEAMID to Steam Community ID
Reply With Quote #149

Quote:
Originally Posted by DJ Tsunami View Post
Which PHP version did you test that on? PHP 5 and lower only support 32-bit integers, so it can't have numbers higher than 429496729. Only PHP 6 (which is still alpha) and PHP 64-bit support numbers up to 18446744073709551615, but only when specifically giving them the int64 data type.
I use PHP 5.2.5 and it seems to work correct, click on the steamid and you get forwarded to the steam community page for that steamid.
__________________
Luck? Luck is only one feeling of amazement concerning a seemingly incidental circumstance which one himself must create.
Maurice is offline
LANrat
Junior Member
Join Date: Jan 2009
Old 03-15-2009 , 22:29   Re: Convert STEAMID to Steam Community ID
Reply With Quote #150

This thread lost me...but interest me.

I have this guy that comes into my server before i banned him and would try to crash it all the time.

any way someone can tell me the steam page for this steamid?

STEAM_0:1:12049330
__________________
LANrat is offline
Reply



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 09:05.


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