Count Available Upgrades
Purpose: Get an instant count of available upgrades for a specific user.
Parent API: Client Ops [http://www.simplescripts.com/api/client_ops.php]
Notes: This tool is great for creating security alerts on the fly, such as dialog popups directly on your control panel.
Creative in Action
Feel free to use this graphic as a guideline for your application.
This API can be accessed via a standard GET or POST request.
|m||"count_upgrades"||"m" sets the mode of operation for the parent API.|
|host_key||Your Host Key||Your Host Key is a unique identifier provided by SimpleScripts for tracking purposes. This key is used in all SimpleScripts APIs.|
|host_api_key||Your Host API Key||Your Host API Key is a special password required to use this and any other SimpleScripts API. Keep this password secure!|
|unique||Current Unique Account ID||The existing host-wide unique id for the client. Can be the user's username (if unique among ALL of your servers) or an account id, etc.|
A successful request (not necessarily a successful operation) will return an integer, either 0 or greater than 0. If 0, the results can be ignored. If greater than 0, denotes the number of available upgrades.
|0||Failed or no upgrades available||0 will be given for any error or when there are no available upgrades. If you receive a 0, there is no need for a security update, or the user doesn't exist.|
|>0||Number of available upgrades||Any number above 0 indicates the number of available upgrades for the specified user.|
$url = "https://www.simplescripts.com/api/client_ops.php";
$my_request = array(
"host_key" => "YOUR HOST KEY",
"host_api_key" => "YOUR HOST API KEY",
"m" => "count_upgrades",
"unique" => "UNIQUE CLIENT ID HERE",
//use CURL or equivalent to get response data
//returns: 0 or number of available upgrades