====== 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 "
Name to search
"; // We display now tlds for($i=1;$i$tlds[$i]"; if(fmod($i,5)==0) echo "
"; } //We manage the result of the form and we display it if($_POST[submit]) { for($i=0;$isend($msg); if ($reply->faultCode()) { printf("couldn't check for availability because: %s\n", $reply->faultString()); } else { $val = $reply->value(); $val->structreset(); echo "
"; while (list($key, $value) = $val->structeach()) { printf("%s : %s\n", $key, $value->scalarval() ? "Available Buy it now !" : "Not Available"); echo "
"; } } } echo "
"; ?>