BO2 RTE REST API

thahitcrew

Modder
Messages
219
Reaction score
211
Points
163
(PS3 Only)
(Thread moved to Web Development section on 5/21/2016)
Hey guys whatsup, recently i finished a small beta version of my new BO2 RTE REST API
(Black Ops 2 Real Time Editing REpresentational State Transfer Application Program Interface - or simply: BO2 RTE REST API).

(NOTE: For the API to work you MUST have my BO2_RTE_API_Response_Listener listener running. For the "changeName", "changePrestige" and "rebootFlagType" parameters to work you MUST be connected to your console. ALSO make sure you have black ops 2 running on your PS3 before attempting to connect to your console via my API)

The API can be used to make simple web based RTE tools on your websites with ease. Here is an example of how to connect/attach to your console using my API in PHP:
PHP:
<?php

if(isset($_POST['SubmitConsoleIP']))//Check if Console IP Has Been Submitted
{
    $ConnectToConsole = file_get_contents("http://ps3cfw.com/api/ps3/ccapi/bo2/RTE.php?consoleIP=CONSOLE_IP_HERE");//Query API with console IP (this is used for the connection process)
}

?>

After the above query has been executed you can check if the connection to your console was completed with success by simply calling my API with the parameter "returnConnectionStatus" equal to "1"
PHP:
http://ps3cfw.com/api/ps3/ccapi/bo2/RTE.php?returnConnectionStatus=1

The above will return a JSON array like so:
PHP:
{"Connection_Status":"1"}
If "Connection_Status" is equal to "1" that means you're currently connected to your console, if "Connection_Status" is equal to "0" OR "0.5" this means you are not connected to your console.

Here is an example of how to check if connection to your console was done with success:
PHP:
<?php

   $PublicIP = "ENTER_YOUR_PUBLIC_IP"; //Enter your PUBLIC ip here, this is used to check DB for console connection status
   $GetConnectionStatus = file_get_contents("http://ps3cfw.com/api/ps3/ccapi/bo2/RTE.php?returnConnectionStatus=1&IPForCheckConnectionStatus=".$PublicIP); //Returns either "1", "0" or "0.5"
   $JSONResponse = $GetConnectionStatus;
   $DecodeJSONArray = json_decode($JSONResponse,true);
   $ConnectionStatus = $DecodeJSONArray['Connection_Status'];
   if($ConnectionStatus == "0" || $ConnectionStatus == "0.5")
   {
       echo "Not Connected";//You're NOT connected to your console
   }
   else
   {
       echo "Connected";//You ARE connected to your console
   }
    
?>

Once you've determined you're connected to your console via my API you can add these parameters to the API: "changeName", "changePrestige" or "rebootFlagType"
the "changeName" parameter is used to change your name, it can be executed like so:
PHP:
http://ps3cfw.com/api/ps3/ccapi/bo2/RTE.php?changeName=^2Enter_Name_Here

The "changePrestige" parameter is used to change your prestige, it can be executed like this:
PHP:
http://ps3cfw.com/api/ps3/ccapi/bo2/RTE.php?changePrestige=Enter_Prestige_Here

The final parameter "rebootFlagType" is used to either ShutDown, HardReboot or SoftReboot your console, here is a list of what each value for the "rebootFlagType" parameter will do:
PHP:
1 = ShutDown
2 = HardReboot
3 = SoftReboot

Here is an example query of how to HardReboot your console:
PHP:
http://ps3cfw.com/api/ps3/ccapi/bo2/RTE.php?rebootFlagType=2


If when attempting to query my API you receive a JSON response that looks somewhat similar to this:
PHP:
{"Response":"0x03"}
that means an error has occurred, here is a list of all errors:
PHP:
0x01 = Already Connected To Your Console
0x02 = Invalid Console IP
0x03 = Unable To Exectue Query Due To Not Being Connected to Console
0x04 = Invalid Reboot Flag Type


Download BO2_RTE_API_Response_Listener:
You do not have permission to view link Log in or register now.


Virus Scan of BO2_RTE_API_Response_Listener:
You do not have permission to view link Log in or register now.


Virus Scan results: (4 / 54) Due to MSIL Obfuscation And/Or string encryption
 
Last edited:

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,998
Reaction score
2,918
Points
1,053
(PS3 Only)
Hey guys whatsup, recently i finished a small beta version of my new BO2 RTE REST API
(Black Ops 2 Real Time Editing REpresentational State Transfer Application Program Interface - or simply: BO2 RTE REST API).

(NOTE: For the API to work you MUST have my BO2_RTE_API_Response_Listener listener running. For the "changeName", "changePrestige" and "rebootFlagType" parameters to work you MUST be connected to your console. ALSO make sure you have black ops 2 running on your PS3 before attempting to connect to your console via my API)

The API can be used to make simple web based RTE tools on your websites with ease. Here is an example of how to connect/attach to your console using my API in PHP:
PHP:
<?php

if(isset($_POST['SubmitConsoleIP']))//Check if Console IP Has Been Submitted
{
    $ConnectToConsole = file_get_contents("http://ps3cfw.com/api/ps3/ccapi/bo2/RTE.php?consoleIP=CONSOLE_IP_HERE");//Query API with console IP (this is used for the connection process)
}

?>

After the above query has been executed you can check if the connection to your console was completed with success by simply calling my API with the parameter "returnConnectionStatus" equal to "1"
PHP:
http://ps3cfw.com/api/ps3/ccapi/bo2/RTE.php?returnConnectionStatus=1

The above will return a JSON array like so:
PHP:
{"Connection_Status":"1"}
If "Connection_Status" is equal to "1" that means you're currently connected to your console, if "Connection_Status" is equal to "0" OR "0.5" this means you are not connected to your console.

Here is an example of how to check if connection to your console was done with success:
PHP:
<?php

   $YourPublicIP = "ENTER_YOUR_PUBLIC_IP"; //Enter your PUBLIC ip here, this is used to check DB for console connection status
   $GetConnectionStatus = file_get_contents("http://ps3cfw.com/api/ps3/ccapi/bo2/RTE.php?returnConnectionStatus=1&IPForCheckConnectionStatus={$YourPublicIP}"); //Returns either "1", "0" or "0.5"
   $JSONResponse = $GetConnectionStatus;
   $DecodeJSONArray = json_decode($JSONResponse,true);
   $ConnectionStatus = $DecodeJSONArray['Connection_Status'];
   if($ConnectionStatus == "0" || $ConnectionStatus == "0.5")
   {
       echo "Not Connected";//You're NOT connected to your console
   }
   else
   {
       echo "Connected";//You ARE connected to your console
   }
      
?>

Once you've determined you're connected to your console via my API you can add these parameters to the API: "changeName", "changePrestige" or "rebootFlagType"
the "changeName" parameter is used to change your name, it can be executed like so:
PHP:
http://ps3cfw.com/api/ps3/ccapi/bo2/RTE.php?changeName=^2Enter_Name_Here

The "changePrestige" parameter is used to change your prestige, it can be executed like this:
PHP:
http://ps3cfw.com/api/ps3/ccapi/bo2/RTE.php?changePrestige=Enter_Prestige_Here

The final parameter "rebootFlagType" is used to either ShutDown, HardReboot or SoftReboot your console, here is a list of what each value for the "rebootFlagType" parameter will do:
PHP:
1 = ShutDown
2 = HardReboot
3 = SoftReboot

Here is an example query of how to HardReboot your console:
PHP:
http://ps3cfw.com/api/ps3/ccapi/bo2/RTE.php?rebootFlagType=2


If when attempting to query my API you receive a JSON response that looks somewhat similar to this:
PHP:
{"Response":"0x03"}
that means an error has occurred, here is a list of all errors:
PHP:
0x01 = Already Connected To Your Console
0x02 = Invalid Console IP
0x03 = Unable To Exectue Query Due To Not Being Connected to Console
0x04 = Invalid Reboot Flag Type


Download BO2_RTE_API_Response_Listener:
You do not have permission to view link Log in or register now.


Virus Scan of BO2_RTE_API_Response_Listener:
You do not have permission to view link Log in or register now.


Virus Scan results: (4 / 54) Due to MSIL Obfuscation And/Or string encryption
Really nice :smile: Thanks a lot.
 
Top