How to create a SOAP domain checker?
===

How can I use the following script (which doesn't work correctly) to check for domain availability in HostBill?

    <?php
    $client = new SoapClient(NULL,
	array(
		"location" => "http://api.rrpproxy.net:8082/soap",
		"uri" => "urn:Api",
		"style" => SOAP_RPC,
		"use" => SOAP_ENCODED,
	)
    );

    $params = array(
	array(
		"s_login" => "[user]",
		"s_pw" => "[password]",
		"command" => "CheckDomain",
		"domain" => "example.com"
	)
    );

    $result = $client->__call("xcall",

    $params,
	array(
		"uri" => "urn:Api",
		"soapaction" => "urn:Api#xcall")
	);

    print_r($result);

    ?>

The above code should eventually output true or false. HostBill class:

    <?php
    /* 
    This is sample class to perform custom domain checks.
    It replaces standard HostBill domain availability check method.
    */
    class CustomWhois {
 
    /*
     * This method should return true if domain is available to register, false otherwise
     */
    public static function is_available($domainname) {
        //perform your domain availability check here
        return true;
    }
    }
    ?>

Many thanks!

Sander