API

From Softaculous Wiki
Jump to: navigation, search

Contents

Softaculous API

Softaculous API can be used to perform various functions in Softaculous like Installing scripts, Upgrading installations, Importing installations, List Installations, Backup installations, Restore backups, List Backups, Remove installations, Delete backups, Download backups.

Admin Functions

Authenticating

Each Control Panel has its own method of authentication. Some panels allow root/admin to access the enduser panel as the enduser over an API call. However that is beyond the scope of this guide.

Enduser

Authenticating

You need to write your authentication method in this step i.e. how the login in your control panel works. If your control panel requires cookie you can generate the cookie in this step and then pass on the cookie while making the API call.

Example

We will take an example of cPanel where the login details are passed in the URL.

$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?';

// Set the curl parameters
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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

Make sure you use this authentication while making any API call.


List Scripts

Key Value Description
Authentication - You can use the Enduser Authenticating or Admin Authentication methods.
act blank or any Any act will do as this is available everywhere.


Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&act=home&api=serialize';

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
 
// Get response from the server.
$resp = curl_exec($ch);

// Unserialize data
$res = unserialize($resp);

// The Installed scripts list is in the array key 'iscripts'
print_r($res['iscripts']);


Install a Script

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act software, js, perl The value should be "software" to install PHP script, "js" to install a JavaScript and "perl" to install a PERL script for softaculous to perform the action of installing a software.
soft 26 (26 is the Script ID of WordPress) The value should be "SID" for softaculous to perform the action of installing a software. You can find the list of sid's here
POST
softsubmit 1 This will trigger the install
softdomain domain.com This is the domain on which you wish to install the script
softdirectory wp This is the sub-directory to install the script in. Leave it blank to install in root of the domain
softdb wp123 This is the database name for the script. If the script does not require database you can leave this blank
dbusername wp123 This is the database user(Only for Softaculous Remote)
dbuserpass w1XRF28mq8 This is the database password. You can generate a random password(Only for Softaculous Remote)
hostname localhost This is the hostname of your MySQL server. You can enter your MySQL server IP if you have MySQL on a remote server(Only for Softaculous Remote)
admin_username admin This is the admin account username for the installation
admin_pass pass This is the admin account password for the installation
admin_email admin@domain.com This is the admin account email address for the installation
language en Language for the installation. You can get the language codes from the respective install.xml
site_name My Blog Site Name for the installation
site_desc My WordPress Blog Site Description for the installation
dbprefix dbpref_ (Optional) Table Prefix to be used for the tables created by application
noemail 1 (Optional) - Use this only if you do not want to send an email to the user
overwrite_existing 1 (Optional) - Use this only if you do not want Softaculous to check for existing files in installation path. If any file(s) exists they will be overwritten.


Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=software'.
                        '&soft=26';

$post = array('softsubmit' => '1',
              'softdomain' => 'example.com', // Must be a valid Domain
              'softdirectory' => 'wp', // Keep empty to install in Web Root
              'softdb' => 'wpdb',
              'admin_username' => 'admin',
              'admin_pass' => 'adminpassword',
              'admin_email' => 'admin@example.com',
              'language' => 'en',
              'site_name' => 'WordPress Site',
              'site_desc' => 'My Blog',
              'dbprefix' => 'dbpref_'
);

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res['done'])){

	print_r($res);

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}


Edit an Installation

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act editdetail The value should be "editdetail" for softaculous to perform the action of editing an installation.
insid 26_12345 The installation ID that you want to edit. It can be fetched from List Installed Script
POST
editins 1 This will trigger the edit function
edit_dir /home/USERNAME/public_html (Optional) Path to installation. If not posted the path in existing records will be used.
edit_url http://example.com (Optional) URL to installation. If not posted the URL in existing records will be used.
edit_datadir /home/USERNAME/datadir (Optional) Path to data directory of the installation. If not posted the data directory in existing records will be used.
edit_dbname username_dbname (Optional) Database name for the installation. If not posted the Database name in existing records will be used.
edit_dbuser username_dbuser (Optional) Database user for the installation. If not posted the Database user in existing records will be used.
edit_dbpass dbpass (Optional) Password of the database user for the installation. If not posted the password in existing records will be used.
edit_dbhost localhost (Optional) Database host for the installation. If not posted the Database host in existing records will be used.
eu_auto_upgrade 1 (Optional) 1 to Enable auto upgrade option and 0 to disable. If not posted the existing setting will not be changed.
auto_upgrade_plugins 1 (Optional) 1 to Enable auto upgrade plugins option and 0 to disable. If not posted the existing setting will not be changed. (Currently this option is supported only in WordPress)
auto_upgrade_themes 1 (Optional) 1 to Enable auto upgrade themes option and 0 to disable. If not posted the existing setting will not be changed. (Currently this option is supported only in WordPress)
noemail 1 (Optional) - Use this only if you do not want to send an email to the user


Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=editdetail'.
                        '&insid=26_12345';

$post = array('editins' => '1',
              'edit_dir' => '/path/to/installation/', // Must be the path to installation
              'edit_url' => 'http://example.com', // Must be the URL to installation
              'edit_dbname' => 'wpdb',
              'edit_dbuser' => 'dbusername',
              'edit_dbpass' => 'dbuserpass',
              'edit_dbhost' => 'dbhost'
);

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res['done'])){

	print_r($res);

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}

// Print the entire output just incase !
print_r($res);


Upgrade an Installed Script

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act upgrade The value should be "upgrade" for softaculous to perform the action of upgrading an installation.
insid 26_12345 The installation ID that you want to upgrade. It can be fetched from List Installed Script
POST
softsubmit 1 This will trigger the upgrade


Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=upgrade'.
                        '&insid=26_12345';

$post = array('softsubmit' => '1');

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res['done'])){

	// There might be some task that the user has to perform
	if(!empty($res['setupcontinue'])){

		echo 'Please visit the following URL to complete upgrade : '.$res['setupcontinue'];	

	// It upgraded
	}else{

		echo 'Upgraded successfully. URL to Installation : '.$res['__settings']['softurl'];	

	}

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}

// Print the entire output just incase !
print_r($res);


Clone an Installed Script

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act sclone The value should be "sclone" for softaculous to perform the action of cloning an installation.
insid 26_12345 The installation ID that you want to clone. It can be fetched from List Installed Script
POST
softsubmit 1 This will trigger the upgrade
softdomain domain.com This is the domain on which you wish to clone the installation
softdirectory wp This is the sub-directory to clone the installation in. Leave it blank to clone in root of the domain
softdb wp123 This is the database name for the cloned installation. If the script does not require database you can leave this blank.


Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=sclone'.
                        '&insid=26_12345';

$post = array('softsubmit' => '1',
              'softdomain' => 'example.com', // Must be a valid Domain
              'softdirectory' => 'wp', // Keep empty to install in Web Root
              'softdb' => 'wpdb'
);

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res['done'])){

	echo 'Cloned successfully. URL to Installation cloned installation : '.$res['__settings']['softurl'];

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}

// Print the entire output just incase !
print_r($res);


Remove an Installed Script

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act remove The value should be "remove" to perform the action of removing an installed script.
insid 8 (Installation ID) Installation ID of the installed script. It can be fetched from List Installed Script
POST
removeins 1 This will trigger the remove install process
remove_dir 1 This is to remove the directory where the script is installed. If you do not want to remove the directory do not pass this key in post.
remove_datadir 1 This is to remove the data directory where the script is installed. If you do not want to remove the data directory do not pass this key in post.
remove_db 1 This is to remove the database of the installation. If you do not want to remove the database do not pass this key in post.
remove_dbuser 1 This is to remove the database user of the installation. If you do not want to remove the database user do not pass this key in post.
noemail 1 (Optional) - Use this only if you do not want to send an email to the user


Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=remove'.
                        '&insid=8';

$post = array('removeins' => '1',
              'remove_dir' => '1', // Pass this if you want the directory to be removed
              'remove_datadir' => '1', // Pass this if you want the data directory to be removed
              'remove_db' => '1', // Pass this if you want the database to be removed
              'remove_dbuser' => '1' // Pass this if you want the database user to be removed
		);

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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);


Import an Installation

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act import The value should be "import" to perform the action of importing an installation.
soft 26 (26 is the Script ID of WordPress) The value should be "SID" for softaculous to perform the action of installing a software. You can find the list of sid's here
POST
softdomain example.com This will be the domain where your script is installed. Domain should be without http:// or https://
softdirectory wp (OPTIONAL) This will be the directory under the domain where your script is installed. Leave this blank if the script is installed in the root of domain.
softsubmit 1 This will trigger the import function.

Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=import'.
			'&soft=26';

$post = array('softsubmit' => 1,
		'softdomain' => 'example.com',
		'softdirectory' => 'wp');

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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);


Import an Installation from Remote server

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act import The value should be "import" to perform the action of importing an installation.
soft 26 (26 is the Script ID of WordPress) The value should be "SID" for softaculous to perform the action of installing a software. You can find the list of sid's here
POST
domain source.example.com This will be the domain where your script is installed.
server_host ftp.example.com (OPTIONAL) This is the server host which will be used as the host to connect via FTP.
protocol ftp The Protocol to use for connecting to the domain. Currently only FTP protocol is supported.
port 21 Port number to connect to the FTP server. FTP default is 21.
ftp_user ftp_user User to connect to the FTP server.
ftp_pass ftp_pass Password for User to connect to the FTP server.
ftp_path /public_html Path to the directory relative to home directory of user for installations.
Installed_path wp (OPTIONAL) This will be the directory under the domain where your script is installed. Leave this blank if the script is installed in the root of domain.
softdomain destination.example.com This is the destination domain on which you wish to import the script.
dest_directory wp_dest (OPTIONAL) This will be the directory under the domain where you want the installation to be imported. Leave this blank if you want to import the installation to the root of your domain.
softdb dbname (OPTIONAL) This is the database name for the script. If the script does not require database you can leave this blank
remote_submit 1 This will trigger the remote import function.

Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=import'.
			'&soft=26';

$post = array('remote_submit' => '1',
              'domain' => 'source.example.com', // Source installation domain
              'server_host' => 'ftp.example.com', // Optional
              'protocol' => 'ftp',
              'port' => '21',
              'ftp_user' => 'ftp_user',
              'ftp_pass' => 'ftp_pass',
              'ftp_path' => '/public_html',
              'Installed_path' => 'wp', // Optional
              'softdomain' => 'destination.example.com', // Destination domain
              'dest_directory' => 'wp_dest', // Optional Directory
              'softdb' => 'dbname' // Database name (Option for scripts that do not have database name)
);

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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);


List Installed Script

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act installations The value should be "installations" to perform the action of listing installations.
showupdates true (OPTIONAL) The value should be "true" if you want to list only installations that have an update available for softaculous to perform the action of listing installations.

Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=installations';


// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res['done'])){

	print_r($res['installations']);

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}



List Outdated Installations/ Installations that need update

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act installations The value should be "installations" to perform the action of listing installations.
showupdates true The value should be "true" if you want to list only installations that have an update available for Softaculous to perform the action of listing installations.

Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=installations'.
			'&showupdates=true';


// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res['done'])){

	print_r($res['installations']);

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}


List Backups

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act backups The value should be "backups" to perform the action of listing backups.

Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=backups';


// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res['done'])){

	print_r($res['backups']);

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}


Backup an Installed Script

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act backup The value should be "backup" to perform the action of taking the backup of the installation.
insid 26_5454 (Installation ID) Installation ID of the installed script. It can be fetched from List Installed Script
POST
backupins 1 This will trigger the backup function.
backup_dir 1 This is to backup the directory
backup_datadir 1 This is to backup the data directory
backup_db 1 This is to backup the database
backup_location 2
(Location ID)
(Optional) - Location id of the backup location where you want to store your current backup. Default value will be the one saved in the installation's settings. You can find the location id from List Backup Locations
noemail 1 (Optional) - Use this only if you do not want to send an email to the user

Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=backup'.
			'&insid=26_4545';

$post = array('backupins' => '1',
              'backup_dir' => '1', // Pass this if you want to backup the directory
              'backup_datadir' => '1', // Pass this if you want to backup the data directory
              'backup_db' => '1', // Pass this if you want to backup the database
              'backup_location' => '2' //Pass this if you want the current backup to be stored at a different location.
		);

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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);


Restore an Installed Script

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act restore The value should be "restore" to perform the action of restoring the backup of the installation.
restore backup_time_insid.tar.gz (Backup File Name) Name of the Backup File. It can be fetched from List Backups
POST
restore_ins 1 This will trigger the restore function.
restore_dir 1 This is to restore the directory
restore_datadir 1 This is to restorethe data directory
restore_db 1 This is to restore the database
noemail 1 (Optional) - Use this only if you do not want to send an email to the user

Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=restore'.
			'&restore=backup_time_insid.tar.gz';

$post = array('restore_ins' => '1',
              'restore_dir' => '1', // Pass this if you want to restore the directory
              'restore_datadir' => '1', // Pass this if you want to restore the data directory
              'restore_db' => '1', // Pass this if you want to restore the database
		);

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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);


Download Backups

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act backups The value should be "backups" to perform the action of downloading the backup of an installation.
download backup_time_insid.zip (Backup File Name) Name of the Backup File. It can be fetched from List Backups

Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=backups'.
			'&download=backup_time_insid.zip';


// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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);

// This will have the backup file content
print_r($resp);


Delete Backups

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act backups The value should be "backups" to perform the action of downloading the backup of an installation.
remove backup_time_insid.zip (Backup File Name) Name of the Backup File. It can be fetched from List Backups

Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=backups'.
			'&remove=backup_time_insid.zip';


// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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);


Edit Enduser Settings

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act settings The value should be "settings" to perform the action of updating the settings of a user.
POST
editsettings 1 This will trigger the edit settings function
language english The language you want to set for the user.
timezone 0 This is the timezone that you want to set for the user. User 0 to set the timezone to Server Default.

Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=settings';

$post = array('editsettings' => 1,
		'language' => 'english',
		'timezone' => '0');

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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);


Edit Enduser Email Settings

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act email The value should be "email" to perform the action of updating the email settings of a user.
POST
editemailsettings 1 This will trigger the edit email settings function
email admin@example.com (Optional) Pass a valid email to receive the updates, leave blank to leave the email unchanged.
ins_email 1 (Optional) Pass this as 1 to enable receiving email for new installations, off to disable the same.
rem_email 1 (Optional) Pass this as 1 to enable receiving email after removing an installation, off to disable the same.
editdetail_email 1 (Optional) Pass this as 1 to enable receiving email after editing an installation, off to disable the same.
backup_email 1 (Optional) Pass this as 1 to enable receiving email after backup of an installation, off to disable the same.
restore_email 1 (Optional) Pass this as 1 to enable receiving email after restore of an installation, off to disable the same.
clone_email 1 (Optional) Pass this as 1 to enable receiving email after cloning an installation, off to disable the same.
disable_all_notify_update 1 (Optional) Pass this as 1 to disable receiving update available notification email, off to enable the same.

Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=email';

$post = array('editemailsettings' => 1,
		'email' => 'admin@example.com',
		'ins_email' => '1');

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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);


Auto Sign On

Key Value Description
Authentication - You can use the Enduser Authenticating or Admin Authentication methods.
act sign_on The value should be "sign_on" to perform the action to get the sign on URL.
insid 26_12345 The installation ID that you want to edit. It can be fetched from List Installed Script
autoid abcdefghijklmnopqrstuvwxyz0123456789 This must be any 32 character random string.

Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=sign_on'.
			'&insid=26_12345'.
			'&autoid=abcdefghijklmnopqrstuvwxyz0123456789';


// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
 
// Get response from the server.
$resp = curl_exec($ch);

On using this API, you will get the sign_on_url, upon accessing which the user will be logged in to the admin panel of the script. You can use the same URL to redirect the user as shown here:

$op = unserialize($resp);
header('Location: '.$op['sign_on_url']);


Task list Status

Key Value Description
Authentication - You can use the Enduser Authenticating methods.
act eu_tasklist The value should be "eu_tasklist" to perform the action to get the status of the task.
ssk abcdefghijklmnopqrstuvwxyz0123456789 The ssk is the status file.

Example

// The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
			'&api=serialize'.
			'&act=eu_tasklist'.
			'&ssk=abcdefghijklmnopqrstuvwxyz0123456789';


// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
 
// Get response from the server.
$resp = curl_exec($ch);

You will get the response as follows:

Array
(
    [title] => Softaculous - Task List
    [status] => Array
        (
            [process] => 
            [current_status] => Propagating the database
            [sid] => 26
            [name] => WordPress
            [version] => 4.7.5
            [softurl] => https://domain.com/
            [completed] => Installation Completed.
            [progress] => 100
        )

    [no_tasks] => 
    [tasks_file] => 
    [timenow] => 1496828740
    [time_taken] => 0.001
)


Add Remote Backup Location

Key Value Description
Authentication - You can use the Enduser Authenticating methods.
act addbackuploc The value should be "addbackuploc" to perform the action to add the remote backup location.
POST
addbackuploc 1 This will trigger the backup location addition process.
location_name Backuploc1 A reference name for the Backup Location.
server_host example.com Server Host where you want to store your backups.
protocol ftp Protocol with which you want to connect to the server host. If empty, default protocol will be FTP.
port 21 Port with which you want to connect to server host. If empty, default FTP port will be 21.
ftp_user ftpusername Username of the FTP account.
ftp_pass ftppassword Password of the FTP account.
backup_loc /backups Relative path from FTP user's directory where you want to store your backups.

Example

//The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
	      '&api=serialize'.
	      '&act=addbackuploc';
			
$post = array('addbackuploc' => '1',
              'location_name' => 'Backuploc1',
              'server_host' => 'example.com', // Pass the server host where you want to store the backup			  
              'protocol' => 'ftp', // Pass the protocol with which you want to connect to server host. Default is FTP.
	      'port' => '21', // Pass the port to connect with server host. Default FTP port is 21.
	      'ftp_user' => 'ftpusername',
	      'ftp_pass' => 'ftppassword',
	      'backup_loc' => '/backups',
	      );

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);

// Done ?
if(!empty($res['done'])){

	echo "Backup location added to server";

// Error
}else{

	echo 'Some error occurred';
	print_r($res['error']);

}



List Backup Locations

Key Value Description
Authentication - You can use the Enduser Authenticating methods.
act settings The value should be "settings" to perform the action to list the backup locations added by you.

Note: This API will be available from Softaculous 4.9.4.

Example

//The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
	    '&api=serialize'.
	    '&act=settings';
			
// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);

//Display the list of backup locations
print_r($res['backup_locs']);


Edit a Remote Backup Location

Key Value Description
Authentication - You can use the Enduser Authenticating methods.
act editbackuploc The value should be "editbackuploc" to perform the action to edit a particular remote backup location.
loc_id 1 Location ID of a remote backup location. It can be fetched from List Backup Locations.
POST
editbackuploc 1 This will trigger the backup location edit process.
location_name Backuploc1 A reference name for the Backup Location.
server_host example.com Server Host where you want to store your backups.
protocol ftp Protocol with which you want to connect to the server host. If empty, default protocol will be FTP.
port 21 Port with which you want to connect to server host. If empty, default FTP port will be 21.
ftp_user ftpusername Username of the FTP account.
ftp_pass ftppassword Password of the FTP account.
backup_loc /backups1 Relative path from FTP user's directory where you want to store your backups.

Example

//The URL
$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
	      '&api=serialize'.
	      '&act=editbackuploc'.
	      '&loc_id=1';
			
$post = array('editbackuploc' => '1',
              'location_name' => 'Backuploc1',
              'server_host' => 'example.com', // Pass the server host where you want to store the backups			  
              'protocol' => 'ftp', // Pass the protocol with which you want to connect to server host. Default is FTP.
	      'port' => '21', // Pass the port with which you want to connect to FTP user account. Default FTP port is 21.
	      'ftp_user' => 'ftpusername',
	      'ftp_pass' => 'ftppassword',
	      'backup_loc' => '/backups1'
	      );

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);

// Done ?
if(!empty($res['done'])){

	echo "Backup location editted successfully";

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}


Delete a Remote Backup Location

Key Value Description
Authentication - You can use the Enduser Authenticating methods.
act settings The value should be "settings" to perform the action to delete a particular remote backup location from list.
del_loc_id 1 Location ID of a remote backup location. It can be fetched from List Backup Locations.

Example

$url = 'https://user:password@domain.com:2083/frontend/paper_lantern/softaculous/index.live.php?'.
	     '&api=serialize'.
	     '&act=settings'.
	     '&del_loc_id=1';

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize.
$res = unserialize($resp);

//Display list of backup locations after successfully removal of a backup location.
print_r($res['backup_locs']);



Admin Panel API

List Installations (Admin Panel)

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act installations This will trigger the list installations function.
POST
listinstallations 1 This will trigger the listinstallations function
users root;user1; (Optional) Pass ; separated list of users to filter installations by users
scripts WordPress;Joomla; (Optional) Pass ; separated list of scripts to filter installations by scripts


Example

// URL
$url = 'http://admin.controlpanel.com:PORT/url/to/softaculous/index.php?'.
			'&api=serialize'.
			'&act=installations';

$post = array('listinstallations' => 1,
              //'users' => 'root;user1;', // Pass this if you want the installation list of specific users
              //'scripts' => 'WordPress;Joomla;', // Pass this if you want the installation list of specific scripts
              );

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res)){

	print_r($res);

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}



List Outdated Installations (Admin Panel)

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act installations This will trigger the list installations function.
show outdated This will trigger the outdated installations list function
POST
listinstallations 1 This will trigger the listinstallations function
users root;user1; (Optional) Pass ; separated list of users to filter installations by users
scripts WordPress;Joomla; (Optional) Pass ; separated list of scripts to filter installations by scripts


Example

// URL
$url = 'http://admin.controlpanel.com:PORT/url/to/softaculous/index.php?'.
			'&api=serialize'.
			'&act=installations'.
			'&show=outdated';

$post = array('listinstallations' => 1,
              //'users' => 'root;user1;', // Pass this if you want the installation list of specific users
              //'scripts' => 'WordPress;Joomla;', // Pass this if you want the installation list of specific scripts
              );

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res)){

	print_r($res);

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}


List Real Version (Admin Panel)

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act installations This will trigger the list installations function.
POST
listinstallations 1 This will trigger the listinstallations function
only_realversion 1 This will trigger the only_realversion function to list only installations in which the version in Softaculous records do not match with actual installation version

Example

// URL
$url = 'http://admin.controlpanel.com:PORT/url/to/softaculous/index.php?'.
			'&api=serialize'.
			'&act=installations';

$post = array('listinstallations' => 1, 'only_realversion' => 1);

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res)){

	print_r($res);

}


Update Real Version (Admin Panel)

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act installations This will trigger the list installations function.
POST
listinstallations 1 This will trigger the listinstallations function
only_realversion 1 This will trigger the only_realversion function to list only installations in which the version in Softaculous records do not match with actual installation version
list array('username-26_68351', 'username-26_68352') This will contain the array list for the installations which needs to be updated in Softaculous record(you will need to pass installation id which you will get from Real Version response in List Real Version

Example

// URL
$url = 'http://admin.controlpanel.com:PORT/url/to/softaculous/index.php?'.
			'&api=serialize'.
			'&act=installations';

$post = array('listinstallations' => 1, 'only_realversion' => 1, 'list' => array('username-26_68351', 'username-26_68352'));

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res)){

	print_r($res);

}


Installation Statistics (Admin Panel)

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act ins_statistics This will trigger the installation statistics function


Example

// URL
$url = 'http://admin.controlpanel.com:PORT/url/to/softaculous/index.php?'.
			'&api=serialize'.
			'&act=ins_statistics';

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res['done'])){

	print_r($res);

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}


Add Plan (ACL)

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act addplans This will trigger the add plan function
POST
saveplan 1 This will trigger the add plan function
planname plan1 Plan name for the new plan being created
resellers_abc 1 (Optional) Use this only if you want to add a reseller to the plan. resellers_ is the prefix for adding a reseller and abc is the name of the reseller (that should already exist). Similarly pass a separate key for each reseller you want to add to the plan.
users_xyz 1 (Optional) Use this only if you want to add a user to the plan. users_ is the prefix for adding a user and xyz is the name of the user (that should already exist). Similarly pass a separate key for each user you want to add to the plan.
scripts_26 1 Use this to pass the scripts to be added to the plan. scripts_ is the prefix for adding a script and 26 is the id of the script to be added. Similarly pass a separate key for each script you want to add to the plan. Get Script ids


Example

// URL
$url = 'http://admin.controlpanel.com:PORT/url/to/softaculous/index.php?'.
			'&api=serialize'.
			'&act=addplans';

$post = array('saveplan' => '1',
	'planname' => 'plan1',
	'resellers_abc' => '1',
	'users_xyz' => '1',
	'scripts_26' => '1', // Add WordPress
	'scripts_413' => '1' // Add Joomla
);

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res['done'])){

	print_r($res);

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}


Edit Plan (ACL)

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act editplans This will trigger the edit plan function
plan plan1 This will be the plan name of the plan you want to edit
POST
saveplan 1 This will trigger the add plan function
planname plan1 Plan name for the new plan being created
resellers_abc 1 (Optional) Use this only if you want to assign a reseller to the plan. resellers_ is the prefix for adding a reseller and abc is the name of the reseller (that should already exist). Similarly pass a separate key for each reseller you want to assign to the plan.
users_xyz 1 (Optional) Use this only if you want to assign a user to the plan. users_ is the prefix for assigning a user and xyz is the name of the user (that should already exist). Similarly pass a separate key for each user you want to assign to the plan.
scripts_413 1 Use this to pass the scripts to be assigned to the plan. scripts_ is the prefix for assigning a script and 26 is the id of the script to be assigned. Similarly pass a separate key for each script you want to assign to the plan. Get Script ids


Example

// URL
$url = 'http://admin.controlpanel.com:PORT/url/to/softaculous/index.php?'.
			'&api=serialize'.
			'&act=editplans'.
			'&plan=plan1';


$post = array('saveplan' => '1',
	'planname' => 'plan1',
	'resellers_abc' => '1',
	'users_xyz' => '1',
	'scripts_543' => '1', // Add Drupal
	'scripts_72' => '1' // Add PrestaShop
);

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res['done'])){

	print_r($res);

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}


Delete Plan (ACL)

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act plans This is the default plans page act
delete plan1 This will be the plan name of the plan you want to delete


Example

// URL
$url = 'http://admin.controlpanel.com:PORT/url/to/softaculous/index.php?'.
			'&api=serialize'.
			'&act=editplans'.
			'&act=plans'.
			'&delete=plan1';

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res['done'])){

	print_r($res);

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}


Enable / Disable Script

Key Value Description
Authenitcation - You can use the Enduser Authenticating or Admin Authentication methods.
act softwares This will trigger the enable/disable script function
POST
updatesoft Update Settings This will trigger the submit function for enabling/disabling the scripts
soft_26 1 Use it to Enable Script from Admin Panel. soft_ is the prefix for enabling a script and 26 is the id of the script to be enabled. Similarly pass a separate key for each script you want to enable. Get Script ids

Note: If you have 10 scripts Enabled. You want to Enable 1 more script you will need to pass all 11 scripts id in the POST data for it to Enable the script. The scripts which are not posted will be disabled.

Example

// URL
$url = 'http://admin.controlpanel.com:PORT/url/to/softaculous/index.php?'.
			'&api=serialize'.
			'&act=softwares';

$post = array('updatesoft' => 'Update Settings',
	'soft_26' => 1, // WordPress
	'soft_18' => 1, // Joomla 2.5
	'soft_543' => 1, // Drupal 8
	'soft_11' => 1, // Open Blog
	'soft_3' => 1, // Serendipity
	'soft_34' => 1, // Dotclear
	'soft_14' => 1, // b2evolution
	'soft_470' => 1 // Ghost
);

// Set the curl parameters.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $time);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Turn off the server and peer verification (TrustManager Concept).
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

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. In this case its PHP Serialize
$res = unserialize($resp);
 
// Done ?
if(!empty($res['done'])){

	print_r($res);

// Error
}else{

	echo 'Some error occured';
	print_r($res['error']);

}