PHP 5 SearchZone

Searches for zones and returns data.

Search for a zone by name by properties and wildcards. eg. Zones with a Record target that is ascio*. ZoneInfoLevel specifies the amount of returned data.

Response SearchZone(SearchZone $searchZone)

Response codes

ResultCodeMessageValue
200OK
401Authorization failed
501Syntax error in parameters or arguments
506Required attribute missing in request

SearchZone Request

Property
searchZoneClauses
zoneInfoLevel

SearchZoneResponse

Property
SearchZoneResult
zones

PHP 5 example

<?php
$wsdl = "http://groupnbt.com/2010/10/30/Dns/DnsService";
//$wsdl = "https://aws.ascio.com/2012/01/01/AscioService.wsdl";
$client = new SoapClient($wsdl,array( "trace" => 1 ));

//SearchZoneClause

$searchZoneClause= array(
	"Operator" => "Is",
	"SearchZoneField" => "ZoneName",
	"Value" => "Mr."
);
//ArrayOfSearchZoneClause

$searchZoneClauses= array(
	$searchZoneClause
);
//SearchZone

$searchZone= array(
	"searchZoneClauses" => $searchZoneClauses,
	"zoneInfoLevel" => "Basic"
);
try{	
    $result = $client->searchZone($searchZone);
    echo "ResultCode : ".$result->SearchZoneResult->ResultCode."\r\n";
    echo "ResultMessage : ".$result->SearchZoneResult->Message."\r\n";
    if($result->SearchZoneResult->Values) {
        foreach($result->SearchZoneResult->Values as $key => $value) {
            echo $value->string."\r\n";
        }
    }
} catch(Exception $e) {
	echo $e->getMessage(); 
}

WSDL AscioDns
https://dnsservice.demo.ascio.com/2010/10/30/DnsService.wsdl (OTE)
https://dnsservice.ascio.com/2010/10/30/DnsService.wsdl (Live)
Please configure the IP-Whitelisting in the portal/demo-portal.