-
-
Save rastating/1ae5eeeaa35e5e04344c to your computer and use it in GitHub Desktop.
Revisions
-
almirsarajcic renamed this gist
Sep 20, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
almirsarajcic revised this gist
Jan 29, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,11 +4,11 @@ function convert_id($id) { if (strlen($id) === 17) { $converted = substr($id, 3) - 61197960265728; } else { $converted = '765'.($id + 61197960265728); } return (string) $converted; -
almirsarajcic revised this gist
Jan 29, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,11 +4,11 @@ function convert_id($id) { if (strlen($id) === 17) { $converted = substr($id, 7) - 7960265728; } else { $converted = '7656119'.($id + 7960265728); } return (string) $converted; -
almirsarajcic revised this gist
Jan 29, 2013 . 2 changed files with 21 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ <?php function convert_id($id) { if (strlen($id) === 17) { $converted = substr($id, 8) - 960265728; } else { $converted = '76561197'.($id + 960265728); } return (string) $converted; } $sixtyfour = '76561197992765754'; $thirtytwo = '32500026'; var_dump(convert_id($thirtytwo) === $sixtyfour); // bool(true) var_dump(convert_id($sixtyfour) === $thirtytwo); // bool(true) -
almirsarajcic created this gist
Jan 29, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ public function convert_id($id) { if (strlen($id) === 17) { $converted = substr($id, 8) - 960265728; } else { $converted = '76561197'.($id + 960265728); } return (string) $converted; }