====== Create a domain search engine ======
This script used our old API and is not usable. We invite you to used our new API [[http://doc.rpc.gandi.net | http://doc.rpc.gandi.net]]
Well then since it's been 2 years, do you think someone could, I don't know, UPDATE this page with script examples that work?
This small PHP code example shows you how it is simple to use our XML API in your own code.
send($msg);
if ($reply->faultCode()) {
echo "couldn't login because: " . $reply->faultString() . "\n";
exit(67);
}
//We store the login session to use it in following methods
$session = $reply->value();
//Let's get the domain extension list managable via the API
//Tlds available on the OT&E differs from the one available in production:
//Note this could differ from the list available on Gandi.net
$msg = new xmlrpcmsg("tld_list", array($session));
$reply = $proxy->send($msg);
if ($reply->faultCode()) {
printf("could not retrieve the TLD list because: %s\n", $reply->faultString());
} else {
$tlds = php_xmlrpc_decode($reply->value());
}
//We can now display the search form
echo "