Skip to content

applibs/interworx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Interworx

API documentation does not include return types for most functions. So you need to address your own expected types and values when implementing.

Usage

include_once 'Interworx/Interworx.php';

$ip = '192.168.1.1';
$key = '-----BEGIN INTERWORX API KEY-----
your interworx certificate
-----END INTERWORX API KEY-----';

//Must be filled in if working with a specific account.
$domain = '';

$iw = new Interworx\Interworx($ip, $key, $domain);

//Example for listing packages.
$result = $iw->Nodeworx()->Packages()->list();
if(!$result) {
    echo 'NO PACKAGES';
    var_dump($iw->error);
    die;
} else {
	var_dump($result);
	echo '<pre>'; 
	var_export($result, true); 
	echo '</pre>';
	die;
}

//Example for creating a new hosting account.
$result = $iw->Nodeworx()->Siteworx()->add('newdomain.com','yor@email.com','password','package_name');
if($result) {
    var_dump($result);
}
else {
    echo 'ERROR:';
    var_dump($iw->error);
}

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages