[EMAIL PROTECTED] wrote:
> Thanks to everyone in advance-
>
> Does anyone have the specifications for the 'check nameserver' function via
> the opensrs api (i am using opensrsphp'. I see it listed in the xcp function
> list but there is no documentation on it. Any help is appreciated-
If you're referring to the XCP function list on the wiki at
developer.tucows.com then yeah, it's a work in progress. I plan to have
it finished by the end of August. In the meantime, the OpenSRS API
documentation has the spec for the Check Nameserver function.
Rather than send you over to the docs, let me give you some sample code
for OpenSRS-PHP. The following code runs Check Nameserver for a
nameserver named ns.somenameserver.com. Note the attributes "tld" (the
top-level domain of the nameserver you want to check) and "fqdn" (the
fully-qualified domain name of the nameserver you want to check).
Here's the code:
---
$srs = new openSRS(SERVER_TYPE, 'XCP');
// SERVER_TYPE is a string constant;
// Valid values are:
// - 'test' to use the Horizon test server
// - 'live' to use the live server
$cmd = array(
'action' => 'registry_check_nameserver',
'object' => 'nameserver',
'attributes' => array(
'tld' => '.com',
'fqdn' => 'ns.somenameserver.com'
)
);
$result = $srs->send_cmd($cmd);
---
If the nameserver exists, the response you get back should be an array
equivalent to the following PHP definition:
array (
_OPS_version => '0.9',
object => 'NAMESERVER',
response_text => 'Command successful',
is_success => '1',
response_code => '200',
protocol => 'XCP',
action => 'REPLY'
)
and if the nameserver doesn't exist, the response you get back should be
an array equivalent to the following PHP definition:
array (
_OPS_version => '0.9',
object => 'NAMESERVER',
response_text => 'Nameserver ns.somenameserver.com not found at
Registry.',
is_success => '0',
response_code => '212',
protocol => 'XCP',
action => 'REPLY'
)
Hope this helps!
--
Joey deVilla - Tucows, Inc. - [EMAIL PROTECTED]
TC/DC (Technical Community Development Coordinator)
"Nerdy Deeds Done Dirt Cheap"
http://farm.tucows.com + http://developer.tucows.com
_______________________________________________
domains-gen mailing list
[email protected]
http://discuss.tucows.com/mailman/listinfo/domains-gen