The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Convert php script to use BCMath instead of GMP
Hey all, I need this script to use BCMath instead of GMP. My webserver is on a shared hosting and they don't support GMP. So the part of this code where there is GMP, I need to have it us BCMath instead, therefore it needs to be edited.
Please PM me with the price and how long this would take. Thanks. Code:
<? define("ACC_NAME", "bouncer222"); define("ACC_PASS", "PASSWORDHERE"); define("GROUP_ID", "103582791430981168"); // open steam group page and see "Enter chat room" link, which contains ID define("MY_STEAM_ID", "STEAM_0:0:35005283"); // steam ID which can invite to join group $invite_steam_id = $_GET['i']; $ids = file('invited_ids.txt'); foreach($ids as $id) { $id = trim($id); if ( $id == $invite_steam_id ) die($id .": Already invited!\n"); } function GetFriendID( $steam_id ) { if ( !$steam_id ) return 0; $auth = explode(':', $steam_id); if ( !$auth[2] ) return 0; $fid = gmp_init($auth[2]); $fid = gmp_mul($fid, "2"); $fid = gmp_add($fid, "76561197960265728"); $fid = gmp_add($fid, $auth[1]); return gmp_strval($fid); } require_once "HTTP/Request.php"; $req = &new HTTP_Request('https://steamcommunity.com'); $req->setMethod(HTTP_REQUEST_METHOD_POST); $req->addPostData("action", "doLogin"); $req->addPostData("goto", ""); $req->addPostData("steamAccountName", ACC_NAME); $req->addPostData("steamPassword", ACC_PASS); echo "Login: "; $res = $req->sendRequest(); if (PEAR::isError($res)) die($res->getMessage()); $cookies = $req->getResponseCookies(); if ( !$cookies ) die("fail!\n"); echo "ok\n"; foreach($cookies as $cookie) $req->addCookie($cookie['name'],$cookie['value']); $mid = GetFriendID(MY_STEAM_ID); $fid = GetFriendID($invite_steam_id); $url = " http://steamcommunity.com/actions/GroupInvite?type=groupInvite&inviter=$mid&invitee=$fid&group=";GROUP_ID; echo "Inviting $invite_steam_id ($fid): "; $req->setMethod(HTTP_REQUEST_METHOD_GET); $req->setUrl($url); $res = $req->sendRequest(); if (PEAR::isError($res)) die($res->getMessage()); $data = $req->getResponseBody(); preg_match("/CDATA\[([^\]]+)\]/", $data, $matches); echo $matches[1] . "\n"; if ( $matches[1] == "OK" ) file_put_contents('invited_ids.txt', $invite_steam_id . "\n", FILE_APPEND); ?> Code:
__int64 GetFriendID( const char *pszAuthID ) { if(!pszAuthID) return 0; int iServer = 0; int iAuthID = 0; char szAuthID[64]; strcpy_s(szAuthID, 63, pszAuthID); char *szTmp = strtok(szAuthID, ":"); while(szTmp = strtok(NULL, ":")) { char *szTmp2 = strtok(NULL, ":"); if(szTmp2) { iServer = atoi(szTmp); iAuthID = atoi(szTmp2); } } if(iAuthID == 0) return 0; __int64 i64friendID = (__int64)iAuthID * 2; //Friend ID's with even numbers are the 0 auth server. //Friend ID's with odd numbers are the 1 auth server. i64friendID += 76561197960265728 + iServer; return i64friendID; } |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|