You can connect to our servers through the API and use things like activating Licenses and transfer credit ...
Our PHP class communicates over the HTTPS protocol and uses the GET method to retreive data in the JSON format.
Authentication errors
100 | Not set Request AND API token! |
101 | API Token is invalid |
102 | Not Found request |
200 | The request has been successfully executed |
Activate License errors
600 | Active Success |
601 | You don't have any licenses for this plan |
602 | Not Found this Plan |
603 | Not Found this user |
604 | Not send plan or Username |
Credit Transfer errors
700 | Credit successfully Added |
701 | Reseller credits is Finished |
702 | Not Found this user |
703 | Credit must be a number and more than 0 |
704 | Not send credit amount or Email |
All API functions return an array that has an element named success that is true or false, if its value is false Communication with api failed and you must send values correctly and another element named message There is an error message that tells you the error codes above.
Active License
With this function you can activate the user account by email. To activate the account you must have License in your reseller account then the server to respond , this process may have an error that is specified above the error code.
Parameters
Returns
<?php ///////// Reseller Token //// $api_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; $plan_key = "cheetah_tool_pro"; // values : lg | cheetah_tool_pro | cheetah_tool_pro_180 | cheetah_tool_pro_90 $get = "cmd=active_license&api_token=".$api_token."&username=".$user_email."&plan_key=".$plan_key; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://cheetah-tool.com/__r_api/?".$get); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $request = curl_exec($ch); $response = json_decode($request, true); if ($response['success'] === "true") { echo "Success Activated: ".$response['code']."<br>"; echo "Message: ".$response['message']; } else { echo "Message: ".$response['message']."<br>"; echo "Error: ".$response['code']."<br>"; }
Transfer Credit
With this function you can transfer Credit to users
Parameters
Returns
<?php ///////// Reseller Token //// $api_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; $credit = 2; $get = "cmd=transfer_credit&api_token=".$api_token."&email=".$user_email."&credit=".$credit; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://cheetah-tool.com/__r_api/?".$get); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $request = curl_exec($ch); $response = json_decode($request, true); if ($response['success'] === "true") { echo "Success Transfered: ".$response['code']."<br>"; echo "Message: ".$response['message']; } else { echo "Message: ".$response['message']."<br>"; echo "Error: ".$response['code']."<br>"; }