Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function Steam64ToID($Steam64, $NewID = false) {
- if(!$NewID) {
- $Server = bcsub($Steam64, '76561197960265728') & 1;
- $Auth = (string)bcdiv(bcsub(bcsub($Steam64, '76561197960265728'), $Server), '2');
- if(strpos($Auth, '.') !== false)
- $Auth = substr($Auth, 0, strpos($Auth, '.'));
- $SteamID = 'STEAM_0:'.$Server.':'.$Auth;
- if($this->ValidID($SteamID, 1))
- return $SteamID;
- } else {
- $Server = bcsub($Steam64, '76561197960265728') & 1;
- $Auth = bcsub(bcsub($Steam64, '76561197960265728'), $Server);
- $ID = (int)bcadd($Auth, $Server);
- $SteamID = '[U:1:'.$ID.']';
- if($this->ValidID($SteamID, 2))
- return $SteamID;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement