Created
November 1, 2013 21:05
-
-
Save mickaelandrieu/7271939 to your computer and use it in GitHub Desktop.
Handle with Softaculous Api in PHP (don't do that at home)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$new = new Softaculous_API(); | |
$new->login = 'https://user:[email protected]:2083/frontend/x3/softaculous/index.live.php'; | |
// Domain Name | |
$data['softdomain'] = 'domain.com'; // OPTIONAL - By Default the primary domain will be used | |
// The directory is relative to your domain and should not exist. e.g. To install at http://mydomain/dir/ just type dir. To install only in http://mydomain/ leave this empty. | |
$data['softdirectory'] = 'wp887'; // OPTIONAL - By default it will be installed in the /public_html folder | |
// Admin Username | |
$data['admin_username'] = 'admin'; | |
// Admin Pass | |
$data['admin_pass'] = 'pass'; | |
// Admin Email | |
$data['admin_email'] = '[email protected]'; | |
// Database | |
$data['softdb'] = 'wp887'; | |
//Database User Name | |
$data['dbusername'] = 'wp887'; | |
// DB User Pass | |
$data['dbuserpass'] = 'wp887'; | |
// Language | |
$data['language'] = 'en'; | |
// Site Name | |
$data['site_name'] = 'Wordpess wp887'; | |
// Site Description | |
$data['site_desc'] = 'WordPress API Test'; | |
// Response | |
$res = $new->install(26, $data); // Will install WordPress(26 is its script ID) | |
// Unserialize | |
$res = unserialize($res); | |
// Done/Error | |
if(!empty($res['done'])){ | |
echo 'Installed'; | |
}else{ | |
echo 'Installation Failed<br/>'; | |
if(!empty($res['error'])){ | |
print_r($res['error']); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment