API: update_service

update_service

Discription:
Update service

Parameter Type Description Required
action string update_service required
hash string Your API hash required
userid int Your customer ID required
serviceid int Service ID required
service_name string The name that will be assigned to the service not required
accessips string A comma-separated list of IP addresses for accessing the proxy without a password. You can specify networks in the range from /23 to /32 not required
Example Request (CURL)
$postfields = array(
		"userid"=>$userid,
		"hash"=>$hash,
		"action"=>"update_service",
		"serviceid"=>3,
		"service_name"=>"New Service Name",
		"accessips"=>"192.168.3.0/23,8.8.8.8"
		);
$result = connect_api_proxy007com($postfields);

function connect_api_proxy007com($postfields)
{
	$url = "https://proxy007.com/proxy/api/index.php";
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_TIMEOUT, 900);
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
	curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
	$data = curl_exec($ch);
	curl_close($ch);
	return $data;
}

					
Answer:

{"code":"2001","status":"successful","serviceid":"3"}