Each account can send a string with extra information to GeoScaling using an [[wp>XML-RPC]] call. This extra string can then be accessed from smart subdomain scripts through the $extra_info variable. The string can be mostly anything.
To send the extra information you need to call the function named //geoscaling.extra_info//. The URL of our XML-RPC server is http://api.geoscaling.com/dns2/xml-rpc/. The function takes 3 arguments:
* username - string - your username
* password - string - your password
* extra_info - string - the string with extra information that you want to send
In the example below we serialized a PHP array and sent it as the string. The code makes use of the [[http://phpxmlrpc.sourceforge.net/|XML-RPC for PHP]] library:
setdebug(1);
$timeout = 5;
$payload['datacenter1'] = "43";
$payload['datacenter2'] = "22";
$payload['datacenter3'] = "87";
$msg = new xmlrpcmsg("geoscaling.extra_info",
array(
php_xmlrpc_encode("USERNAME"),
php_xmlrpc_encode("PASSWORD"),
php_xmlrpc_encode(serialize($payload))
)
);
$response = $client->send($msg, $timeout);
if($response->faultCode())
{
print_r($response->faultString());
}
else
{
print_r(php_xmlrpc_decode($response->val));
}
echo "\n";
?>
The XML-RPC function returns one of the following values:
define("OK", 1, true);
define("WRONG_PARAMETER_COUNT", 2, true);
define("USER_PASS_INCORRECT", 3, true);
define("EXTRA_INFO_NOT_STRING", 4, true);
define("EXTRA_INFO_TOO_LONG", 5, true);