Cheetah tool suporte
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 licenses for this plan |
| 602 | Not Found this Plan |
| 603 | Not Found this email |
| 604 | Not send PlanID or Email |
| 605 | Your reseller account disabled |
Credit Transfer errors
| 700 | Credit successfully Added |
| 701 | Reseller credit is Finished |
| 702 | Not Found this user |
| 703 | Credit must be a number and more than 5 |
| 704 | Not send credit amount or Email |
| 705 | Your reseller account disabled |
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.
Get prices & Plans
With this function you can load credit and license reseller prices
Parameters
Returns
Message { plans
[{"plan_id":x,"plan_name":"CHEETAH TOOL PRO activation 12 Month","price":"xx"},{"plan_id":xx,"plan_name":"CHEETAH TOOL PRO activation 6 Month","price":"xx"}
,{"plan_id":xx,"plan_name":"CHEETAH TOOL PRO activation 3 Month","price":"xx"}] ,
"credit_price":"0.x" }
<?php ///////// Reseller Token //// $api_token = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; $get = "cmd=get_prices&api_token=".$api_token; $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 var_dump($response ); }
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_id = "take from get prices api (https://cheetah-tool.com/__r_api/?cmd=get_prices&api_token=xxx)"; $get = "cmd=active_license_new&api_token=".$api_token."&username=".$user_email."&plan_id=".$plan_id; $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>"; }