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

Convert STEAMID to Steam Community ID


Post New Thread Reply   
 
Thread Tools Display Modes
8088
Veteran Member
Join Date: Jan 2008
Old 10-09-2010 , 11:20   Re: Convert STEAMID to Steam Community ID
Reply With Quote #251

No URL, no errors...how do you expect to be helped?
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
cooltruck
Member
Join Date: Oct 2010
Old 10-09-2010 , 13:07   Re: Convert STEAMID to Steam Community ID
Reply With Quote #252

Well there was no errors I would just input the steam id and the page refreshes and does not give the output. I am not uploading the .php onto my webhost, already tried did not work.
cooltruck is offline
8088
Veteran Member
Join Date: Jan 2008
Old 10-09-2010 , 13:18   Re: Convert STEAMID to Steam Community ID
Reply With Quote #253

Oh ok.
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
cooltruck
Member
Join Date: Oct 2010
Old 10-10-2010 , 14:54   Re: Convert STEAMID to Steam Community ID
Reply With Quote #254

Got any Ideas you can advise on how to fix this
cooltruck is offline
8088
Veteran Member
Join Date: Jan 2008
Old 10-10-2010 , 16:21   Re: Convert STEAMID to Steam Community ID
Reply With Quote #255

Tons. But, like I hinted, it will be a lot easier to narrow it down if you provide relevant information. Like errors (enable error reporting) and a link to your page.
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
raylapa
Junior Member
Join Date: Nov 2009
Old 10-19-2010 , 16:29   Re: Convert STEAMID to Steam Community ID
Reply With Quote #256

Hi folks!

First of all - nice work! I have integrated the script (slightly modified) into our community website.

Only one thing: if you put in just the community ID like 7656119XXXXXXXXXX it gives you a "Error: invalid input" ...

If you put in the complete URL http://steamcommunity.com/profiles/7656119XXXXXXXXXX it works perfectly.

Tested as well at noobsticks.com - same error.

Last edited by raylapa; 10-19-2010 at 17:04.
raylapa is offline
Rizla
SourceMod Donor
Join Date: Jun 2010
Old 10-23-2010 , 02:38   Re: Convert STEAMID to Steam Community ID
Reply With Quote #257

anyone help me with this? its only returning one link and thats the one thats already in there:

Code:
//convert the steam id
$auth_id = mysql_query("SELECT authid FROM sb_admins WHERE srv_group = 'Rizla Server' OR srv_group = 'Lower Server Admins' OR srv_group = 'Server Admins'");
$community_id *= 2;
$community_id += 76561197960265728;
$community_id += substr($authid, 8, 1); 
$site = "http://steamcommunity.com/profiles/".$community_id ."";


//show the data
 
Print "<table border cellpadding=3>"; while($info = mysql_fetch_array( $data )) 
{ 
Print "<tr>"; Print "<td>".$info['user'] . "</td> "; Print "<td>".$info['authid'] . " </td>"; Print "<td>$site</td></tr>"; } Print "</table>";
im a total php noob, been trying to get this working for a few hours now, looked through countless pages for help

it returns this and only this for every row:
http://steamcommunity.com/profiles/76561197960265736

Last edited by Rizla; 10-23-2010 at 02:41.
Rizla is offline
8088
Veteran Member
Join Date: Jan 2008
Old 10-23-2010 , 09:58   Re: Convert STEAMID to Steam Community ID
Reply With Quote #258

Rizla, I suppose you're trying to do something like this:
PHP Code:
//prepare the query
$sql "SELECT authid FROM sb_admins WHERE srv_group = 'Rizla Server' OR srv_group = 'Lower Server Admins' OR srv_group = 'Server Admins'";

//perform the query and store the resource in '$query'
$query mysql_query($sql);

//see if there are any results at all
if(mysql_num_rows($query) > 0)
{
    
//there is one or more results, start printing the table
    
print '<table border="1" cellpadding="3">';
    
    
//fetch every possible row from the resource and do nice stuff with it
    
while($info mysql_fetch_assoc$data ))
    {
        
//convert the steamid into a community id
        
$community_id = ((substr($authid10)) * 2) + 1197960265728 + (substr($authid81)); 
        
        
//create a link to the Steam community profile
        
$site 'http://steamcommunity.com/profiles/'.$community_id;
        
        
//print the table row with all the info
        
print '<tr><td>'.$info['user'].'</td><td>'.$info['authid'].'</td><td>'.$site.'</td></tr>';
    }
    
//close the table
    
print '</table>';
}
//there are no results
else print 'No results'
Quote:
Originally Posted by raylapa View Post
Only one thing: if you put in just the community ID like 7656119XXXXXXXXXX it gives you a "Error: invalid input" ...
Thanks, I'll post a fix later.
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
Rizla
SourceMod Donor
Join Date: Jun 2010
Old 10-23-2010 , 17:52   Re: Convert STEAMID to Steam Community ID
Reply With Quote #259

thanks for your help, but if i just use the commnuity id converting part i only gives me:

http://steamcommunity.com/profiles/

if i use your whole thing whilst still using my first query i get:

http://steamcommunity.com/profiles/1197960265728 for all of them still

[removed that part - fixed]

Last edited by Rizla; 10-23-2010 at 18:00.
Rizla is offline
8088
Veteran Member
Join Date: Jan 2008
Old 10-23-2010 , 18:08   Re: Convert STEAMID to Steam Community ID
Reply With Quote #260

Oops, I made a mistake while copy/pasting.

Replace
PHP Code:
while($info mysql_fetch_assoc$data )) 
with
PHP Code:
while($info mysql_fetch_assoc($query)) 
__________________
steamID converter with OpenSearch browser plugin
8088 is offline
Reply


Thread Tools
Display Modes

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 08:42.


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