PHP 5 Whois

Get the whois for a domain-name.

Response Whois(string $sessionId,string $domainName)

Response codes

ResultCodeMessageValue
200OK
401Authorization failed

Whois request

PropertyDescription
sessionIdExample: o58t9fjgw9bjarp6q7byv13e
domainName

WhoisResponse

Property
WhoisResult
whoisData

PHP 5 example

<?php
$wsdl = "https://aws.demo.ascio.com/2012/01/01/AscioService.wsdl";
//$wsdl = "https://aws.ascio.com/2012/01/01/AscioService.wsdl";
$client = new SoapClient($wsdl,array( "trace" => 1 ));

//Whois

$whois= array(
	"sessionId" => env.getSessionId(),
	"domainName" => "domainNameTest"
);
try{	
    $result = $client->whois($whois);
    echo "ResultCode : ".$result->WhoisResult->ResultCode."\r\n";
    echo "ResultMessage : ".$result->WhoisResult->Message."\r\n";
    if($result->WhoisResult->Values) {
        foreach($result->WhoisResult->Values as $key => $value) {
            echo $value->string."\r\n";
        }
    }
} catch(Exception $e) {
	echo $e->getMessage(); 
}

WSDL for AWS v2
https://aws.demo.ascio.com/2012/01/01/AscioService.wsdl (OTE)
https://aws.ascio.com/2012/01/01/AscioService.wsdl (Live)