Personal tools

From HEXONET Wiki

Jump to: navigation, search

EPP access using the Net::DRI perl library

The ISPAPI Registry driver for Net::DRI enables you to connect HEXONET's EPP server and gives you the possibility to manage a wide range of gTLDs and ccTLDs. In addition to the EPP 1.0 compliant commands there is a Key-Value mapping for additional domain related parameters which are required by several registries. The driver also supports all other HEXONET commands like queries for domain and contact lists. It is also possible to access additional HEXONET products like ssl certificates.

Net::DRI support for HEXONET's ISPAPI EPP server has been included in Net::DRI 0.96_01 (DEVELOPMENT RELEASE) which can be downloaded here:

Download: http://www.hexonet.net/files/sdk/perl/net-dri/Net-DRI-latest.tar.gz


The latest release of Net::DRI can be downloaded here:

Download: http://www.dotandco.com/services/software/Net-DRI/


HEXONET's ISPAPI patches for Net::DRI 0.96 can be downloaded here:

Download: Net-DRI-ISPAPI.tar.gz

perl code example

use Net::DRI;

my $r = eval {
 my $dri = Net::DRI->new( { cache_ttl => 10 } );

# load DRD for ISPAPI
 $dri->add_registry('ISPAPI');

# create new connection to the EPP server, port 1700 (OT&E)
 $dri->target('ISPAPI')->add_current_profile('profile1', 'epp', {
  remote_port => 1700,
  client_login => 'test.user',
  client_password => 'test.passw0rd'
 } );

# using an extension hash for IDN registration, set transferlock, create DNS zone
 my $kv = {
  'X-IDN-LANGUAGE' => 'de',
  'TRANSFERLOCK' => 1,
  'INTERNALDNS' => 1
 };
 my $create_rc = $dri->domain_create('xn--mller-kva.com',{pure_create => 1, auth => { pw => '2fooBAR' }, keyvalue => $kv});
 print STDERR $create_rc->as_string(1);
 
 print STDERR "\n";
 print STDERR "\n";

# query a domain name, in addition get the RENEWALMODE
 my $info_rc = $dri->domain_info('000audio.com', {keyvalue => { COMMAND => 'StatusDomain'} });
 print STDERR $info_rc->get_data('keyvalue')->{RENEWALMODE};

 print STDERR "\n";
 print STDERR "\n";

# free-form API call, used to query the account status
 my $api = $dri->remote_object('api');
 my $rc = $api->call( { COMMAND => "StatusAccount" } );
 $kv = $rc->get_data('keyvalue');
 foreach my $key ( sort keys %$kv ) {
  print STDERR "$key=".$kv->{$key}."\n";
 }

 print STDERR "\n";
 print STDERR "\n";