Raised This Month: $32 Target: $400
 8% 

Showing results 1 to 12 of 12
Search took 0.00 seconds.
Search: Posts Made By: DJ Tsunami
Forum: Snippets and Tutorials 08-22-2014, 04:55
Replies: 358
Views: 549,343
Posted By DJ Tsunami
Re: Convert STEAMID to Steam Community ID

Here are some snippets that support the new Steam3 format.

PHP (with GMP, but should be easy to convert to BCMath):


function getCommunityId($steamId)
{
$accountId = 0;

if...
Forum: Snippets and Tutorials 05-14-2013, 13:59
Replies: 358
Views: 549,343
Posted By DJ Tsunami
Re: Convert STEAMID to Steam Community ID

JavaScript doesn't support 64-bit integers, you need a library like bignum (https://github.com/justmoon/node-bignum).
Forum: Snippets and Tutorials 05-10-2011, 12:49
Replies: 358
Views: 549,343
Posted By DJ Tsunami
Re: Convert STEAMID to Steam Community ID

Apparently http://steamidconverter.com requires it to start with STEAM_0. I'm pretty sure most converters do work with STEAM_1 (the last number is simply ignored, as it's not used for the conversion).
Forum: Snippets and Tutorials 09-27-2009, 09:00
Replies: 358
Views: 549,343
Posted By DJ Tsunami
Re: Convert STEAMID to Steam Community ID

?> is optional :) But you're probably better at C++ than PHP :o
Forum: Snippets and Tutorials 09-09-2009, 04:17
Replies: 358
Views: 549,343
Posted By DJ Tsunami
Re: Convert STEAMID to Steam Community ID

That is the Steam2Friends module 8088 is referring to. He wrote it and he released it.
Forum: Snippets and Tutorials 04-09-2009, 04:11
Replies: 358
Views: 549,343
Posted By DJ Tsunami
Re: Convert STEAMID to Steam Community ID

Converting from Steam ID to Community ID allows you to get any type of stats from their community page. Getting them to show up on your MOTD is a different story though, but there are already topics...
Forum: Snippets and Tutorials 03-01-2009, 03:59
Replies: 358
Views: 549,343
Posted By DJ Tsunami
Re: Convert STEAMID to Steam Community ID

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...
Forum: Snippets and Tutorials 09-20-2008, 07:00
Replies: 358
Views: 549,343
Posted By DJ Tsunami
Re: Convert STEAMID to Steam Community ID

Through the Steam interface you need their username. Through the Steam protocol you can use their community id, which of course you can calculate from their steam id. Just run...
Forum: Snippets and Tutorials 09-12-2008, 12:18
Replies: 358
Views: 549,343
Posted By DJ Tsunami
Re: Convert STEAMID to Steam Community ID

Well alright, the whole reason you need to use BCMath is because PHP doesn't support 64-bit integers. Olly made this but it's reported not to work for all Steam IDs:
$steamParts = explode(":",...
Forum: Snippets and Tutorials 09-12-2008, 04:55
Replies: 358
Views: 549,343
Posted By DJ Tsunami
Re: Convert STEAMID to Steam Community ID

Sorry, I kind of forgot the * 2.

$community_id = 76561197960265728 + substr($steamid, 9, 1) + substr($steamid, 11, 10) * 2;
Forum: Snippets and Tutorials 09-10-2008, 17:24
Replies: 358
Views: 549,343
Posted By DJ Tsunami
Re: Convert STEAMID to Steam Community ID

This SQL that was posted earlier works fine for me:
CAST(MID(steamid, 9, 1) AS UNSIGNED) + CAST("76561197960265728" AS UNSIGNED) + CAST(MID(steamid, 11, 10) * 2 AS UNSIGNED)
Translated to PHP that...
Forum: Snippets and Tutorials 05-17-2008, 08:40
Replies: 358
Views: 549,343
Posted By DJ Tsunami
Re: Convert STEAMID to Steam Community ID

Yes, it does. Why do you ask? There are plenty of other places where it would be useful to convert a Steam ID to a Profile ID.
Showing results 1 to 12 of 12

 
Forum Jump

All times are GMT -4. The time now is 22:27.


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