The HOMER API is designed to be plain and self-explaning. Therefore it takes a minimal amount of time to integrate HOMER into any new or already existing infrastructure.
command=addwebspace class=php quota=50 EOF [RESPONSE] code = 200 description = Command completed successfully property[webspace][0]=webspace_mc29fyz9ek property[ip][0]=217.188.214.193 property[price][0]=0.8 queuetime=0 runtime=2.82 EOF
The return data of this command contains the unique id of the new webspace and its IP address.
command=addwebhost webspace=webspace_mc29fyz9ek webhost=www.example.com dir=/local_directory ftppasswd=somepasswd EOF [RESPONSE] code = 200 description = Command completed successfully; version = 2.0.4 property[ip][0]=217.188.214.193 queuetime=0 runtime=0.853 EOF
After this command the webspace can be accessed via FTP and HTTP. If the hostname name should not be used as the login name then the optional command login can be used to set another login name.
require_once('libmreg.inc.php');
$command = array(
'command' => 'addwebspace',
'quota' => $megabytes,
'class' => 'php',
'period' => $months,
);
$return = mreg_call($command, $socket);
if ( $return['CODE'] == 200 ) {
# success
...
require('libmreg.pl');
my $command = {
'command' => 'addwebspace',
'quota' => $megabytes,
'class' => 'php',
'period' => $months
};
my $response = mreg_call($command, $socket);
if ( $response ->{'CODE'} == 200 ) {
# success
...
Additionally, there are many other interfaces available to operate HOMER: