This is an old revision of the document!
Each account can send a string with extra information to GeoScaling using an 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://xml-rpc.geoscaling.com/. The function takes 3 arguments:
In the example below we serialized a PHP array and sent it as the string. The code makes use of the XML-RPC for PHP library:
<?PHP include("lib/xmlrpc/xmlrpc.inc"); $client = new xmlrpc_client("http://xml-rpc.geoscaling.com/"); //$client->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);