oaaron99

Untitled

Dec 3rd, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. function toCommunityID($id)
  2. {
  3. if (preg_match('/^STEAM_/', $id)) {
  4. $parts = explode(':', $id);
  5. return bcadd(bcadd(bcmul($parts[2], '2'), '76561197960265728'), $parts[1]);
  6. } elseif (is_numeric($id) && strlen($id) < 16) {
  7. return bcadd($id, '76561197960265728');
  8. } else {
  9. return $id; // We have no idea what this is, so just return it.
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment