SteamID with PHP in panel. & text string to command.
8 replies, posted
Hello gentlemen.
I have tried to make this work for a long time, but without luck.
I'm trying to make a html panel show the steam id.
Im using this piece of code atm
[CODE]<?php
$communityid = $_GET["steamid"];
$authserver = bcsub($communityid, '76561197960265728') & 1;
$authid = (bcsub($communityid, '76561197960265728')-$authserver)/2;
$steamid = "STEAM_0:$authserver:$authid";
echo "This is your steam ID.<br>";
echo "$steamid";
?>
[/CODE]
And it displayes just fine, but for some reason the steam ID that is printed out is in the format of:
[CODE]STEAM_0:0:-X.XXXXXXXXXXXXXE+16[/CODE]
Any ideas?
Any help is very welcome :)
[QUOTE=Roag15;43736230]Perhaps you could look at the API key?[/QUOTE]
Would you care to explain? :)
You're just not giving it a correct value.
[URL]http://thed3vine.net/stid.php?steamid=1[/URL]
Gives a response similar to the one you're getting.
[URL]http://thed3vine.net/stid.php?steamid=76561197991481006[/URL] (a correct 64bit steamid)
Gives a correct response.
This is with the source code you have.
[QUOTE=KingofBeast;43737187]You're just not giving it a correct value.
[URL]http://thed3vine.net/stid.php?steamid=1[/URL]
Gives a response similar to the one you're getting.
[URL]http://thed3vine.net/stid.php?steamid=76561197991481006[/URL] (a correct 64bit steamid)
Gives a correct response.
This is with the source code you have.[/QUOTE]
Meaning the php code ran in a panel is unable to pick up the players SteamID?
[QUOTE=zapha;43738192]Meaning the php code ran in a panel is unable to pick up the players SteamID?[/QUOTE]
Show the Panel code.
Ah, ignore me, it's overly sill way of doing it. These guys will know much more than I do.
Just came back to this thread, sorry for the 4-day bump.
Not sure if you have this figured out yet. Though if you're trying to convert SteamIDs from within gmod, it seems overly complicated to be doing it with a web request. Look into util.SteamIDFrom64 and util.SteamIDTo64
Sorry, you need to Log In to post a reply to this thread.