• [Source] Steam Signature SteamProfile clone
    73 replies, posted
Clone script of SteamProfile's Steam Signature. [IMG]http://ugleh.com/ss/x2nk1i.png[/IMG] [IMG]http://ugleh.com/sig/76561198004627776.png[/IMG] [url]http://www.multiupload.com/TUU3IH8FJ5[/url] The ability to set up a Steam Signature, this script cache's images for every 10 minutes. Meaning status doesn't get updated for 10 minutes prior to the last cache. Instead most Status Signatures this script will redirect to the generated image in the cache directory, instead of direct image output. This can save traffic and server usage if the web server has caching abilities for static files, but may confuse users because of the changing URLs. The config file has the ability to change the cache time. Default is 10 minutes. ReadMe.html for how to install and exc. Demo: [url]http://ugleh.com/sig/[/url] Warning, this is a demo and is NOT the actually place holder. I am providing the download link above for people who own web hosts.
What?
[IMG]http://ugleh.com/sig/76561197986981962.png[/IMG] Oh cool it works. Nice job :).
[img]http://ugleh.com/sig/76561197984495267.png[/img] pretty neat
Oh I understand now. Dunno where I'd use it, but pretty cool anyway
[img]http://ugleh.com/sig/76561198000029658.png[/img] Nice, I love it
[IMG]http://ugleh.com/sig/76561197981491402.png[/IMG] I see unicode isn't supported :( Those are ment to be russian cyrillic letters by the way.
[QUOTE=Shammah;23779628][IMG]http://ugleh.com/sig/76561197981491402.png[/IMG] I see unicode isn't supported :( Those are ment to be russian cyrillic letters by the way.[/QUOTE] Ill see if i can fix that. and whats up with this Bad Spelling x 2 Where is my Bad Spelling? And I didn't ask you to use it?
I love this, thanks a lot!
releasing an update, just use the new download link above. [img]http://ugleh.com/ss/aw3zef.png[/img]
Direct links would be nice. [code] echo "<br /><b><font color=red>Direct link</font></b><br />"; echo "<input type='text' value=\"$websiteurl$newuserid.png\" />"; [/code] Killers Servers are hosting this if you guys want to use it. UK server. [IMG]http://killersservers.co.uk/sig/76561197977393696.png[/IMG] [url]http://killersservers.co.uk/sig[/url]
[IMG]http://ugleh.com/sig/76561198000098698.png[/IMG]
[QUOTE=LiquidGame;23782426] Killers Servers are hosting this if you guys want to use it. UK server.[/QUOTE] Since you are hosting this i guess i should tell you Im going to be adding a new feature, where the user can use his SteamID. [code] <?php function steam_id($FriendID){ $idm = "STEAM_0:"; $newnumber1 = $FriendID - 76561197960265728; $newnumber2 = $newnumber1 / 2; $rest = substr("$newnumber2", -2); if ($rest == ".5"){ $idm .= "1:"; }else{ $idm .= "0:"; } return $idm.$newnumber2; } ?> [/code] turns FriendID to SteamID. So ill be coding the vice versa.
[IMG]http://ugleh.com/sig/76561198007048993.png[/IMG] Pretty Sweet
[QUOTE=Uglehs;23784261]Since you are hosting this i guess i should tell you Im going to be adding a new feature, where the user can use his SteamID. [code] <?php function steam_id($FriendID){ $idm = "STEAM_0:"; $newnumber1 = $FriendID - 76561197960265728; $newnumber2 = $newnumber1 / 2; $rest = substr("$newnumber2", -2); if ($rest == ".5"){ $idm .= "1:"; }else{ $idm .= "0:"; } return $idm.$newnumber2; } ?> [/code] turns FriendID to SteamID. So ill be coding the vice versa.[/QUOTE] Okay, I could do that but I'm not sure how to avoid the issues with the number being to big for a 32 bit OS.
32-bit systems can handle virtually arbitrary length numbers.
[QUOTE=ZeekyHBomb;23784579]32-bit systems can handle virtually arbitrary length numbers.[/QUOTE] [code] $useridar = explode(':', $userid, -1); $userid = (76561197960265728 + intval($useridar[1])) + (intval($useridar[2]) * 2); [/code] Returns 7.65611979603E+16 instead of the community ID.
[QUOTE=ZeekyHBomb;23784579]32-bit systems can handle virtually arbitrary length numbers.[/QUOTE] Actually, 32-bit systems can handle 32-bit numbers, putting a signed integer's length at a maximum of 2,147,483,647.
[QUOTE=LiquidGame;23784706][code] $useridar = explode(':', $userid, -1); $userid = (76561197960265728 + intval($useridar[1])) + (intval($useridar[2]) * 2); [/code] Returns 7.65611979603E+16 instead of the community ID.[/QUOTE] I know that PHP is weakly typed, but is there some way of forcing it to treat numbers as integer as opposed to floating-point values? [QUOTE=arienh4;23784756]Actually, 32-bit systems can handle 32-bit numbers, putting a signed integer's length at a maximum of 2,147,483,647.[/QUOTE] When ignoring fancy instruction sets like MMX 'n stuff that allow bigger numbers, then you are right for a [i]single[/i] instruction. You can, however, simply split it into multiple instructions. The meaning of data is only what you interpret into it.
[QUOTE=LiquidGame;23784706][code] $useridar = explode(':', $userid, -1); $userid = (76561197960265728 + intval($useridar[1])) + (intval($useridar[2]) * 2); [/code] Returns 7.65611979603E+16 instead of the community ID.[/QUOTE] Use the GMP maths library for php instead.
[QUOTE=LiquidGame;23784706][code] $useridar = explode(':', $userid, -1); $userid = (76561197960265728 + intval($useridar[1])) + (intval($useridar[2]) * 2); [/code] Returns 7.65611979603E+16 instead of the community ID.[/QUOTE] here is the new index.php [code] <form action="" method="post"> <input type="Submit" value="Submit" /><br /> User ID: <input type="text" name="userid" /> This is not your name, but your Steam Community ID.<br /> </form> <?php if($_POST){ require_once("config.php"); function friendid($id){ if(strpos(strtolower($id), 'team_')) { $newid = '7656'.(((substr($id, 10)) * 2) + 1197960265728 + (substr($id, 8, 1))).''; return $newid; }else{ return $id; } } $userid = friendid($_POST['userid']); function grabdata($url){ $data = file_get_contents($url); $content = html_entity_decode($data); return $content; } $grabbeddata = grabdata("http://steamcommunity.com/profiles/".$userid.""); $targetstring = "Failed loading profile data"; if(stristr($grabbeddata, $targetstring) == TRUE) { $grabbeddata = grabdata("http://steamcommunity.com/id/".$userid.""); } $v = '/steam:\/\/friends\/add\/(.+?)"/'; preg_match($v,$grabbeddata,$a); $newuserid = $a[1]; if($newuserid){ echo "<img src='$websiteurl$newuserid.png'>"; echo "<br /><b><font color=red>HTML</font></b><br />"; echo "<input type='text' value=\"<img src='$websiteurl$newuserid.png'>\" />"; echo "<br /><b><font color=red>BBCode</font></b><br />"; echo "<input type='text' value=\"[IMG]$websiteurl$newuserid.png[/IMG]\" />"; echo "<br /><b><font color=red>Direct Link</font></b><br />"; echo "<input type='text' value=\"$websiteurl$newuserid.png\" />"; }else{ echo "Unknown profile"; } } ?> [/code] Ill repackage it in abit. The code you where looking for is this. [code] function friendid($id){ if(strpos(strtolower($id), 'team_')) { $newid = '7656'.(((substr($id, 10)) * 2) + 1197960265728 + (substr($id, 8, 1))).''; return $newid; }else{ return $id; } } [/code]
[IMG]http://ugleh.com/sig/76561197999945200.png[/IMG] :V
I updated it, still does not work correctly on 32 bit servers, added a echo to newid to show that. Also GMP is not available by default on cPanel server so il have to do a custom compile in the morning for that.
your running your server on a mac? Ive never heard of such things! Windows and Linux, but never mac 0_0
[QUOTE=Uglehs;23791230]your running your server on a mac? Ive never heard of such things! Windows and Linux, but never mac 0_0[/QUOTE] It's not the least bit unusual. Honestly, I think it's a better choice than Windows. It's built on a robust BSD-derived foundation, which lends itself well to server use.
You could make it clickable, so it always links to one .php file, what redirects the user to some page. When user is on server it redirects to join the server, when user is not on server but is playing game it launches the game and when user is just offline or online it goes to profile page.
[QUOTE=Uglehs;23791230]your running your server on a mac? Ive never heard of such things! Windows and Linux, but never mac 0_0[/QUOTE] Wait what? I'm running CentOS.. lol.
Im running CentOS too, no problems at all. ok so [img]http://ugleh.com/ss/b12wwh.png[/img] New update, probably last of all the bugs so no more I think. Redownload link on the top.
[QUOTE=ZeekyHBomb;23784896]I know that PHP is weakly typed, but is there some way of forcing it to treat numbers as integer as opposed to floating-point values? When ignoring fancy instruction sets like MMX 'n stuff that allow bigger numbers, then you are right for a [i]single[/i] instruction. You can, however, simply split it into multiple instructions. The meaning of data is only what you interpret into it.[/QUOTE] Of course you can. But since PHP doesn't do it by default it's still causing problems.
The problem is that it is not 64 bit. I decided to go with 32 bit for my servers a while ago because of a PHP module one of my customers wanted to use that had issues with 64 bit. Changing to 64 bit would require way to much down time. Uglehs, I think your index.php in the new rar is the old one.
Sorry, you need to Log In to post a reply to this thread.