buy
MultiPHP Manager

Description

Use the MultiPHP Manager API to manage multiple PHP's for domain.
The API response Setting saved successfully.

Parameters

Sample Code

curl --insecure  -d "domain.com=domain.com" -d "php_version_domain.com=php_version" -X POST "https://hostname:2005/index.php?api=json&act=multiphp_manager&submitphp=Submit&apiuser=root&apikey=pass_api_key"
<?php
 
$url = 'https://hostname:2005/index.php?api=json&act=multiphp_manager&apiuser=user_name&apikey=pass_api_key'; 

$post = array('submitphp' => 'Submit',
	      'domain.com' => 'domain.com',
	      'php_version_domain.com' => 'php_version'
);


// Set the curl parameters 
$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 

if(!empty($post)){
	curl_setopt($ch, CURLOPT_POST, 1);
	curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
}

// Get response from the server. 
$resp = curl_exec($ch);

// The response will hold a string as per the API response method. 
$res = json_decode($resp, true);
// Done ?
if(!empty($res['done'])){
    echo "<pre>";
    print_r($res['done']['msg']);
    echo "</pre>";
}else{
	print_r($res['error']);
}
<?php
include_once('/usr/local/webuzo/sdk/webuzo_sdk_v2.php');

$user = 'user_name';
$pass = 'password';
$host = 'hostname';

$webuzo = new Webuzo_Admin_SDK($user, $pass, $host);
$act= 'act=multiphp_manager';
$data['submitphp']= 'Submit';
$data['domain.com']= 'domain.com';
$data['php_version_domain.com']= 'php_version';
$res = $webuzo->aapi_call($act, $data);

// Done/Error
if(!empty($res['error'])){
	print_r($res['error']);
}else{
	print_r($res);
}

?>

To configure multiple domains, you can provide comma separated domain name and along with set PHP version.

eg. For CURL set  -d  "abc.com" -d  "php_version_abc.com=php80"  -d  "xyz.com"  -d  "php_version_xyz.com=php80parameters.

eg. For PHP set $post = array('submitphp' => 'Submit', 'abc.com' => 'abc.com', 'php_version_abc.com' => 'php80', 'xyz.com' => 'xyz.com', 'php_version_xyz.com' => 'php81');

Note: if you leave the php_version_domain.com field empty , it will set default  PHP version for the domain.

Output

Setting saved successfully.
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list