API FOR DOMAIN NAME RESELLER

The API (Application Programming Interface) allow you to manage your domain name from software write in your favorite language. (We provide examples for PHP et Perl.)

Since Apr, 15 2008 the following TLD can be managed by the API :

Top Level Domain (TLD) Registry Price example for domain name create
.COM Verisign GRS 5,99 €
.NET Verisign GRS 4,99 €
.ORG PIR 4,99 €
.BIZ NeuLevel 4,99 €
.INFO Afilias 4,99 €
.NAME GNR 5,99 €
.TEL TelNIC 6,99 €
.MOBI dotMobi 9,99 €
.ASIA DotAsia 9,99 €
.EU EurID 4,99 €
.FR (France) AFNIC 4,80 €
.BE (Belgique) Dns.BE 3,99 €
.US (USA) NeuStar 9,99 €
.TW (Taiwan) TWNIC 15,00 €
.ME Domain.me 9,99 €
.CO.UK Nominet 4,99 €
.ORG.UK Nominet 4,99 €

This API is used since 2006 October by resellers managing more than 100,000 domain names.

Synopsis



Become reseller

The API is reserved for reseller (company) with a minimuum of 10 domains create by month.

3 Steps to become reseller:

  • Step 1: Request a reseller account on our web site https://www.bookmyname.com/revendeur.cgi
  • Step 2: You will receive an e-mail with administrative documents (agreement,etc.) and a login/passwd for test plateform (OT&E).
  • Step 3: As soon as we received a signed agreement, and after technical test you will get acces to production servers.

General information

Servers and services

We provide API usage examples for PHP and Perl language.

PHP required : PHP 5.1 + Soap Client
Perl required : Perl 5 + SOAP::Lite >= 0.67

From the API there’s functions domain_check and domain_multicheck, but we also provide acces to a DAS server (Domain Availability Service).

For TLDs (.COM .NET .ORG .BIZ .INFO .NAME .MOBI .US .FR)

Plateform Hostname Port TCP
OT&E das.dev.bookmyname.com 4343
Production das.bookmyname.com 4343

For ccTLD .BE (service provided directly from Dns.BE registry)

Plateform Hostname Port TCP
Production whois.dns.be 4343

For ccTLD .EU (service provided directly from EurID registry)

Plateform Hostname Port TCP
Production das.be 4343

Documentation: http://registrar.eurid.eu/en/registrar/registrar-content/das-domain-availability-service

How to use DAS server from Linux/FreeBSD: $ whois -h das.bookmyname.com -p 4343 “get 1.0 mondomaine-a-moi.org”

Plateform Hostname Port TCP
OT&E api.dev.bookmyname.com 80
Production api.bookmyname.com 80 or 443

If your domain name is include in your DNS hostname, you must provide IP address to the registry managing your domain TLD.

Example:

DNS hostname nsa.bookmyname.com
domain name bookmyname.com

nsa.bookmyname.com IP address must be provided to the registry managing the .com TLD (Verisign).
All API host_* function is designed to manage this kind of registration, also called ‘glue record’.


Domain names statuts

fields values descriptions
registry_status 0×01 clientDeleteProhibited
registry_status 0×02 serverDeleteProhibited
registry_status 0×04 clientHold
registry_status 0×08 serverHold
registry_status 0×10 clientRenewProhibited
registry_status 0×20 serverRenewProhibited
registry_status 0×40 clientTransferProhibited
registry_status 0×80 serverTransferProhibited
registry_status 0×100 clientUpdateProhibited
registry_status 0×200 serverUpdateProhibited
registry_status 0×400 pendingCreate
registry_status 0×800 pendingDelete
registry_status 0×1000 pendingRenew
registry_status 0×2000 pendingTransfer
registry_status 0×4000 pendingUpdate

API functions

All functions return an array (key/value)

  "retcode"   => integer
  "retval"    => integer
  "retfields" => array

* “retcode” and “retval” key are ALWAYS available.
if “retcode” is different of 1 ⇒ there’s a probleme (check retval value)

* “retfields” array is available in many case and usefull to check result of request.

WARNING, YOU ** MUST ** check the process operation state by api_status for each following command:

. domain_create, domain_renew, domain_update, domain_delete, domain_transfer
. host_create, host_update, host_delete

As well we will suggest you, to archive all request/reply from the API.

API variables used in this document examples:

    $dist_id    =   reseller login id
   
    $dist_passwd =  reseller password
   
    $domain = domain name (.com .net .org .biz .info .name .eu .be .us .fr)
  
    $period = year number (from 1 to 10)
  
    $id     = contact ID
  
    $handle = contact handle
  
    $tid    = transaction ID (to check the operation state)
              'status' can be one of the following enum('Wait','ToProcess','Done','Error')
  
    $array_domain = array(
        "domain"   => $domain,  // domain name
        "period"   => 1,        // 1 year registration
        "owner_id" => $id,      // contact ID 
        "admin_id" => $dist_id, // Contact Admin = reseller?
        "tech_id"  => $dist_id, // Contact Technique = reseller?
        "bill_id"  => $dist_id, // Contact Billing = reseller?
        "service"  => "dns",    // dns or dnsslave
        "ip_dns_master"  => "", // if dnsslave => provide master IP
        "ns0"  => "ns0.online.net", // up to 13 DNS for update
        "ns1"  => "ns1.online.net"  // or maxi 4 for create
  
        // fields only used by domain_update();
 
        "registry_status" => 0,     // Example: 64=clientTransferProhibited
        "authinfo" => "EPPauthCode" // EPP AuthCode change
        );
  
    $array_contact = (
        "passwd" => "tres-secret",
        "email" => "dupond@free.fr",
        "hash_email" => "yes",              // yes no
        "formejuridique" => "particulier",  // from enum('Particulier','Societe','Association','Autre')
        "civilite" => "M",                  // from enum('','M','Mme','Mle')
        "nom" => "DUPOND",
        "prenom" => "Pierre",
        "societe" => "",
        "adresse1" => "12 Rue du chien qui fume",
        "adresse2" => "",
        "cp" => "75001",
        "ville" => "PARIS",
        "region_id" => "",                  // voir api_regionid()
        "pays_id" => "1",                   // voir api_paysid()
        "telephone" => "+33.147010203",
        "telecopie" => "",
        "numero_tva" => "",
        "siret" => "",
        "lang" => "fr",                     // fr en de es
        "revente" => "no",                  // yes no
  
        // NEXUS (only usefull for .US registration)
  
        "dotus_nexus_purpose" => "",
            // Purpose
            // P1 Business
            // P2 Non-Profit Business
            // P3 Personal Use
            // P4 Education
            // P5 Goverment
  
        "dotus_nexus_category" => "",
            // Category
            // C11 U.S. Citizen
            // C12 U.S. Permanent Resident
            // C21 U.S. Organization Incorprated in U.S.
            // C31 Non-US: Regularly engages in lawful activities in U.S.
            // C32 Non-US: Entity has an office or other facility in U.S.
  
	// FR Extensions (only usefull for .FR registration)
 
	// .FR Registry authenticate owner of domain name, so you must choose
	// and authentication method (WARNING, check 'formejuridique' to be
	// sure of non-stupid choice, otherwise AFNIC will reject your request)
 
        "dotfr_mode" => "",         // enum('MARQUE','SIRET','PARTICULIER','ASSOCIATION')
 
        "dotfr_marque" => "",       // French INPI trademark registration number
 
	// private individual
        "dotfr_ne_le" => "",        // birth date : (JJ-MM-AAAA)
        "dotfr_ne_cp" => "",        // birth zip code
        "dotfr_ne_ville" => "",     // birth town
        "dotfr_ne_pays_id" => "1",  // birth country - voir api_paysid();
 
	// for french "association loi 1901"
        "dotfr_publication_jo" => "", // date de publication au journal officiel sous la forme: (JJ-MM-AAAA)
        "dotfr_publication_jo_page" => "", // numero de page de la publication au journal officiel
 
        // .ASIA Extensions (only usefull for .ASIA registration) for more information:
	// http://registry.asia/policies/DotAsia-Charter-Eligibility--COMPLETE-2007-08-15.pdf
        "asia_locality" => "",        // pays_id country in Asie,Australia,Pacific area
        "asia_typeofentity" => "",    // enum('naturalPerson','corporation','cooperative','partnership','government','politicalParty','society','institution')
        "asia_formofident" => "",     // enum('passport','certificate','legislation','societyRegistry','politicalPartyRegistry')
        "asia_identnumber" => "",     //
 
        // Extensions (utile uniquement pour le ccTLD .UK)
        "dotuk_mode" => "",           // Registrant types. http://www.nominet.org.uk/registrars/systems/data/regtype/
                                      // enum('LTD','PLC','IND','FIND','RCHAR','SCH','LLP','STRA','PTNR','GOV','CRC','STAT','FCORP','IP','OTHER','FOTHER')
        "dotuk_locality" => "",
        "dotuk_county" => "",
        "dotuk_trad_name" => "",
        "dotuk_co_number" => "",
 
        );

Before all operation, you must construct a SoapClient object.

PHP Example 5.1:

    $client = new SoapClient( NULL,
        array(  'location' => "http://api.dev.bookmyname.com/apis.cgi",
                'uri' => "http://api.dev.bookmyname.com/apis.cgi",
                'encoding'=>'UTF-8'
                )
            );

Perl Example:

    use SOAP::Lite;
 
    my $client = SOAP::Lite
        -> uri('http://api.dev.bookmyname.com/apis.cgi')
        -> proxy('http://api.dev.bookmyname.com/apis.cgi');

Contacts management

Prototype:

function contact_create( $dist_id, $dist_passwd, $array_contact )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2 Unable to create contact (Handle)
-1 -3 Bad type for $array_contact
-1 -4 Missing elements in $array_contact
0 0 ID doesn’t exist
1 ID OK (return contact array in retfields[])

[retcode] => 1
[retval] => 151049
[retfields] => Array
    (
        [id] => 151049
        [parent_id] => 13490
        [lastupdate] => 2006-09-26 21:42:59
        [lastupdate_ip] => 88.191.249.162
        [handle] => PD86-FREE
        [creation] => 2006-09-26 21:42:59
        [email] => dupond@free.fr
        [md5_email] => eb94fe20.151049@contacts.nospam.free.org
        [hash_email] => yes
        [formejuridique] => Particulier
        [civilite] => M
        [nom] => DUPOND
        [prenom] => Pierre
        [societe] => 
        [adresse1] => 12 Rue du chien qui fume
        [adresse2] => 
        [cp] => 75001
        [ville] => PARIS
        [pays_id] => 1
        [telephone] => +33.147010203
        [telecopie] => 
        [numero_tva] => 
        [siret] => 
        [lang] => fr
        [revente] => no
        [status] => Active
        [pays] => FRANCE
    )

PHP Example:

    /* Contact create --------------------------------------------- */
 
    $newcontact = array (
        "passwd" => "coincoin",
        "email" => "dupond@free.fr",
        // yes/no
        "hash_email" => "yes",
        // enum('Particulier','Societe','Association','Autre') 
        "formejuridique" => "particulier",
        // enum('','M','Mme','Mle')
        "civilite" => "M",
        "nom" => "DUPOND",
        "prenom" => "Pierre",
        "societe" => "",
        "adresse1" => "12 Rue du chien qui fume",
        "adresse2" => "",
        "cp" => "75001",
        "ville" => "PARIS",
        // voir api_regionid()
        "region_id" => "",
        // voir api_paysid()
        "pays_id" => "1",
        "telephone" => "+33.147010203",
        "telecopie" => "",
        "numero_tva" => "",
        "siret" => "",
        // fr en de es 
        "lang" => "fr",
        // yes/no
        "revente" => "no",
 
        // NEXUS (utile uniquement pour l'enregistrement de .US)
        "dotus_nexus_purpose" => "", 
            // "P1" Business
            // "P2" Non-Profit Business
            // "P3" Personal Use
            // "P4" Education
            // "P5" Goverment
        "dotus_nexus_category" => "",
            // "C11" U.S. Citizen
            // "C12" U.S. Permanent Resident
            // "C21" U.S. Organization Incorprated in U.S.
            // "C31" Non-US: Regularly engages in lawful activities in U.S.
            // "C32" Non-US: Entity has an office or other facility in U.S.
 
	// Extensions (utile uniquement pour lenregistrement de .FR)
 
	// choix de la methode d'authentification par l'AFNIC
        "dotfr_mode" => "",         // enum('MARQUE','SIRET','PARTICULIER','ASSOCIATION')
 
        "dotfr_marque" => "",       // une marque de l'INPI or OHMI
 
	// pour un particulier
        "dotfr_ne_le" => "",        // date de naissance sous la forme: (JJ-MM-AAAA)
        "dotfr_ne_cp" => "",        // code postal du lieu de naissance
        "dotfr_ne_ville" => "",     // ville du lieu de naissance
        "dotfr_ne_pays_id" => "1",  // pays du lieu de naissance - voir api_paysid();
 
	// pour une association loi 1901
        "dotfr_publication_jo" => "", // date de publication au journal officiel sous la forme: (JJ-MM-AAAA)
        "dotfr_publication_jo_page" => "", // numero de page de la publication au journal officiel
 
        // Extensions (utile uniquement pour le ccTLD .UK)
        "dotuk_mode" => "",           // Registrant types. http://www.nominet.org.uk/registrars/systems/data/regtype/
                                      // enum('LTD','PLC','IND','FIND','RCHAR','SCH','LLP','STRA','PTNR','GOV','CRC','STAT','FCORP','IP','OTHER','FOTHER')
        "dotuk_locality" => "",
        "dotuk_county" => "",
        "dotuk_trad_name" => "",
        "dotuk_co_number" => "",
 
        );
 
    echo "contact_create() \n";
    $result = $client->contact_create( $dist_id, $dist_passwd, $newcontact );
    print_r( $result );
 
    if ( $result['retcode'] != 1 )
        die( "Ca ne fonctionne pas !" );

Perl Example:

    # Contact Create
 
    my $contact_id;
 
    my %newcontact = (
	# force type string pour eviter la conversion en float
        'passwd' => SOAP::Data->type(string =>'coincoin'),
        'email' => 'dupond@free.fr',
        # yes/no
        'hash_email' => 'yes',
        # enum('Particulier','Societe','Association','Autre')
        'formejuridique' => 'particulier',
        # enum('','M','Mme','Mle')
        'civilite' => 'M',
        'nom' => 'DUPOND',
        'prenom' => 'Pierre',
        'societe' => '',
        'adresse1' => '12 Rue du chien qui fume',
        'adresse2' => '',
        'cp' => SOAP::Data->type(string =>'75001'),
        'ville' => 'PARIS',
        # voir api_regionid()
        'region_id' => '',
        # voir api_paysid()
        'pays_id' => '1',
	# force type string pour eviter la conversion en float
        'telephone' => SOAP::Data->type(string =>'+33.147010203'),
        'telecopie' => SOAP::Data->type(string => ''),
        'numero_tva' => '',
        'siret' => SOAP::Data->type(string =>''),
        'lang' => 'fr',
        'revente' => 'no',
 
        # NEXUS (utile uniquement pour l'enregistrement des .US
        'dotus_nexus_purpose' => '',
            # "P1" Business
            # "P2" Non-Profit Business
            # "P3" Personal Use
            # "P4" Education
            # "P5" Goverment
        'dotus_nexus_category' => '',
            # C11" U.S. Citizen
            # "C12" U.S. Permanent Resident
            # "C21" U.S. Organization Incorprated in U.S.
            # "C31" Non-US: Regularly engages in lawful activities in U.S.
            # "C32" Non-US: Entity has an office or other facility in U.S.
    );
 
    print "contact_create\n";
    $result = $client->contact_create( $dist_id, $dist_passwd, SOAP::Data->type(map =>\%newcontact));
 
    if ($result->result->{'retcode'} !=1)
    {
        die "Ca ne fonctionne pas create!\n";
    };
    $contact_id = $result->result->{'retval'};
 

Prototype:

function contact_update( $dist_id, $dist_passwd, $id, $array_contact )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2 Access denied ($dist_id need more right to manage $id)
-1 -3 $id status != ‘Active’ (Deleted, Suspended, UDRP, etc.)
-1 -4 bad type $array_contact
-1 -5 Missing elements in $array_contact
0 0 ID doesn’t exist
1 ID OK (return contact array in retfields[])

[retcode] => 1
[retval] => 151049
[retfields] => Array
    (
        [id] => 151049
        [parent_id] => 13490
        [lastupdate] => 2006-09-26 21:42:59
        [lastupdate_ip] => 88.191.249.162
        [handle] => PD86-FREE
        [creation] => 2006-09-26 21:42:59
        [email] => dupond@free.fr
        [md5_email] => eb94fe20.151049@contacts.nospam.free.org
        [hash_email] => yes
        [formejuridique] => Particulier
        [civilite] => M
        [nom] => DUPONT
        [prenom] => Pierre
        [societe] => 
        [adresse1] => 12 Rue du chien qui fume
        [adresse2] => 
        [cp] => 75001
        [ville] => PARIS
        [pays_id] => 1
        [telephone] => +33.147010203
        [telecopie] => +33.173500000
        [numero_tva] => 
        [siret] => 
        [lang] => fr
        [revente] => no
        [status] => Active
        [pays] => FRANCE
    )

PHP Example:

    /* Update d'un contact ---------------------------------------------- */
 
    // $result = resultat d'un contact_info() 
    $contact_id = $result['retval'];
    $updcontact = $result['retfields'];
    $updcontact['nom'] = "DUPONT";
    $updcontact['telecopie'] = "+33.173500000";
 
    echo "contact_update() \n";
    $result = $client->contact_update( $dist_id, $dist_passwd, 
        $contact_id, $updcontact );
    print_r( $result );
 
    if ( $result['retcode'] != 1 )
        die( "Ca ne fonctionne pas !" );

Perl Example:

    # Update d'un contact
 
    $updcontact{'nom'} = 'DUPONT';
    $updcontact{'telecopie'} = SOAP::Data->type(string =>'+33.173500000');
 
    print "contact_update\n";
    $result = $client->contact_update( $dist_id, $dist_passwd, $contact_id,
	SOAP::Data->type(map => \%updcontact ));
    if ($result->result->{'retcode'} !=1)
    {
        die "Ca ne fonctionne pas !\n";
    };

Prototype:

function contact_delete( $dist_id, $dist_passwd, $id )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2 $dist_id n’a pas les droits nécessaires pour agir sur $id
-1 -3 l’ID est utilisé par un domain name
0 0 l’ID n’existe pas
1 ID OK (retourne aussi un tableau retfield[])

PHP Example:

    /* Delete d'un contact ---------------------------------------------- */
 
    echo "contact_delete()\n";
    $result = $client->contact_delete( $dist_id, $dist_passwd, $id );
    print_r( $result );
 
    if ( $result['retcode'] != 1 )
        die( "Ca ne fonctionne pas !" );

Perl Example:

    # Delete d'un contact
 
    print "contact_delete\n";
    $result = $client->contact_delete( $dist_id, $dist_passwd, $contact_id );
    print Data::Dumper->Dump([$result->result]);

Prototype:

function contact_info( $dist_id, $dist_passwd, $handle, $id )

fournir $handle OU ($id avec $handle vide)

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
0 0 $id or $handle doesn’t existe
1 ID OK (return array retfields[])

[retcode] => 1
[retval] => 151049
[retfields] => Array
    (
        [id] => 151049
        [parent_id] => 13490
        [lastupdate] => 2006-09-26 21:42:59
        [lastupdate_ip] => 88.191.249.162
        [handle] => PD86-FREE
        [creation] => 2006-09-26 21:42:59
        [email] => dupond@free.fr
        [md5_email] => eb94fe20.151049@contacts.nospam.free.org
        [hash_email] => yes
        [formejuridique] => Particulier
        [civilite] => M
        [nom] => DUPONT
        [prenom] => Pierre
        [societe] => 
        [adresse1] => 12 Rue du chien qui fume
        [adresse2] => 
        [cp] => 75001
        [ville] => PARIS
        [pays_id] => 1
        [telephone] => +33.147010203
        [telecopie] => +33.173500000
        [numero_tva] => 
        [siret] => 
        [lang] => fr
        [revente] => no
        [status] => Active
        [pays] => FRANCE
    )

PHP Example:

    /* Info a propos d'un contact --------------------------------------- */
 
    echo "contact_info()\n";
    $id = 123;
    $result = $client->contact_info( $dist_id, $dist_passwd, "", $id );
    print_r( $result );
 
    echo "contact_info() par handle du type 'QQQ123-FREE'\n";
    $handle = "QQQ123-FREE";
    $result = $client->contact_info( $dist_id, $dist_passwd, $handle );
    print_r( $result );

Perl Example:

    # Info a propos d'un contact
 
    print "contact_info id\n";
    $result = $client->contact_info( $dist_id, $dist_passwd, '', $contact_id );
    print Data::Dumper->Dump([$result->result->{'retfields'}]);
 
    if ($result->result->{'retcode'} !=1)
    {
        die "Ca ne fonctionne pas contact_info\n";
    };
    %updcontact = %{$result->result->{'retfields'}};
 
    my $handle = $result->result->{'retfields'}->{'handle'};
 
    print "contact_info handle $handle\n";
 
    $result = $client->contact_info( $dist_id, $dist_passwd, $handle );
    print Data::Dumper->Dump([$result->result->{'retfields'}]);

Prototype:

function contact_list( $dist_id, $dist_passwd )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
0 0 no contact
1 ID OK (return array retfields[])

PHP Example:

    /* Liste les contacts cree par le reseller $dist_id ---------------- */
 
    echo "contact_list()\n";
    $result = $client->contact_list( $dist_id, $dist_passwd );
    print_r( $result );

Perl Example:

    # Liste les contacts cree par le reseller $dist_id
 
    print "contact_list()\n";
    $result = $client->contact_list( $dist_id, $dist_passwd );
    print Data::Dumper->Dump([$result->result->{'retfields'}]);


Domain names management

Prototype:

function domain_check( $dist_id, $dist_passwd, $domain )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2 Domain name not available (allready in our database)
-1 -3 We do not manage this domaine name TLD
-1 -4 Domain name unavaible from registry
-1 -5 Domain name undefined
1 1 Domain name IS avaiable

    [retcode] => 1
    [retval] => 1

PHP Example:

    /* Controle la disponibilite d'un domain name -------------------- */
 
    $domain = sprintf( "mydomaine-%d.com", time() );
 
    echo "domain_check() $domain\n";
    $result = $client->domain_check( $dist_id, $dist_passwd, $tdomain );
    print_r( $result );

Perl Example:

    # Controle la disponibilite d'un domain name
 
    print "domain_check()\n";
    my $name= sprintf( "demo-now-%d", time() );
 
    my @adomain = map { "$name.".$_ } ('com','net','org','info','biz','name','us','eu');
    
    foreach my $domain (@adomain)
    {
        $result = $client->domain_check($dist_id, $dist_passwd,$domain);
        print "$domain\n";
        print Data::Dumper->Dump([$result->result]);
    };

Prototype:

function domain_multicheck( $dist_id, $passwd, $domain )

$domain doit être fourni sans TLD

Valeur de retour:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2 Domain name undefined
1 1 One or severals domain names are availbles (check retfields[])

For each TLD (1 = avaiable, 0 = unavailable)

[retcode] => 1
[retval] => 1
[retfields] => Array
    (
        [com] => 0 
        [net] => 1
        [org] => 0
        [biz] => 1
        [info] => 1
        [mobi] => 1
        [pro] => 1
        [name] => 1
        [us] => 1
        [eu] => 0
        [be] => 1
        [fr] => 1
        [cn] => 1
    )

PHP Example:

    /* Controle la disponibilite d'un domain name -------------------- */
    /* pour l'ENSEMBLE des TLDs gere par l'API -------------------------- */
 
    $domain = sprintf( "mydomain-now-%d", time() );
    $result = $client->domain_multicheck( $dist_id, $dist_passwd, $domain );
    print_r( $result );

Perl Example:

    # Controle la disponibilite d'un domain name 
    # pour l'ENSEMBLE des TLDs gere par l'API
 
    print "domain_multicheck()\n";
    my $name= sprintf( "mydomain-now-%d", time() );
    $result = $client->domain_multicheck( $dist_id, $dist_passwd, $name);
    print Data::Dumper->Dump([$result->result]);

Prototype:

function domain_create( $dist_id, $dist_passwd, $array_domain )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2 Domain name unavailable
-1 -3 Missing elements in array $array_domain
-1 -4 owner_id or admin_id or tech_id or bill_id was not usable
-1 -5 Undefined domain name
-1 -6 Missing elements from $owner_id to be able to create .US or .FR
-1 -7 Invalid DNS or DNS Zone for .FR invalid ZoneCheck
-1 -8 Invalid DNS (DNS hostname doesn’t exist for registry)
-1 -9 Invalid DNS (No IP for glue record)
1 TID (transaction ID used by api_status() )

WARNING, you ** MUST ** check the operation processing state by api_status.

[retcode] => 1
[retval] => 277
[retfields] => Array
    (
        [tid] => 277
        [id] => 141958
        [lastupdate] => 2006-09-26 21:43:09
        [lastupdate_ip] => 88.191.249.162
        [domain] => demo-now-1159299779.com
        [registrar_creation] => 0000-00-00 00:00:00
        [registrar_expiration] => 0000-00-00 00:00:00
        [authinfo] => hqruzKPTYZ13
        [service] => dns
        [status] => Active
        [registry_status] => 0
        [ns0] => ns0.online.net
        [ns1] => ns1.online.net
        [bill_id] => 13490
        [tech_id] => 13490
        [admin_id] => 13490
        [owner_id] => 151049
    )

PHP Example:

    /* Creation d'un domain name ------------------------------------- */
 
    $domain = sprintf( "mydomaine-%d.com", time() );
    
    $newdomain = array(
        "domain"   => $domain,  // domain name
        "period"   => 1,        // enregistrement pour 1 an
        "owner_id" => $id,      // contact ID cree dans le meme exemple
        "admin_id" => $admin_id, // Contact Admin = reseller 
        "tech_id"  => $tech_id, // Contact Technique = reseller
        "bill_id"  => $bill_id, // Contact Billing = reseller
        "service"  => "dns",    // dns or dnsslave
        "ip_dns_master"  => "", // si dnsslave => fournir l'IP du master
        "ns0" => "ns0.online.net",
        "ns1" => "ns1.online.net", // jusqu'a 4 DNS possible (13 en update)
        "ipns0"  => "",
        "ipns1"  => "",         // glue record si besoin
    
        // les fields suivant sont uniquement utilise par domain_update();
        "registry_status" => 0,     // clientTransferProhibited on/off
        "authinfo" => "EPPauthCode" // EPP AuthCode
        );
 
    echo "domain_create() \n";
    $result = $client->domain_create( $dist_id, $dist_passwd, $newdomain );
    print_r( $result );
    
    if ( $result['retcode'] != 1 )
        die( "Ca ne fonctionne pas !" );

Perl Example:

    my $tid;
    my %newdomain;
    # Creation d'un domain name
 
    print "domain_create\n";
    my $domain= 'demo-now-'.time()."-$$.com";
 
     %newdomain =(
        "domain"   => $domain,  # domain name
        "period"   => 1,        # enregistrement pour 1 an
        "owner_id" => $contact_id, # contact ID cree dans le meme exemple
        "admin_id" => $dist_id, # Contact Admin = reseller 
        "tech_id"  => $dist_id, # Contact Technique = reseller
        "bill_id"  => $dist_id, # Contact Billing = reseller
        "service"  => "dns",    # dns or dnsslave
        "ip_dns_master"  => "", # si dnsslave => fournir l'IP du master
        "ns0" => "ns0.online.net",
        "ns1" => "ns1.online.net",  # jusqu'a 13 DNS possible
        "ns2" => "ns0.$domain",     # dns avec glue => fournir son IP
        "ips2" => "213.228.62.20"
    );
 
    $result = $client->domain_create( $dist_id, $dist_passwd, 
        SOAP::Data->type(map => \%newdomain ));
 
    print Data::Dumper->Dump([$result->result]);
 
    if ($result->result->{'retcode'} !=1)
    {
        die "Ca ne fonctionne pas !\n";
    };
    $tid = $result->result->{'retval'};

Prototype:

function domain_renew( $dist_id, $dist_passwd, $domain, $period )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2
-1 -3 bad period
-1 -4 undefined domain name
0 0 Domain name doesn’t exist in our database
1 TID (OK check ‘tid’ transaction ID used by api_status() )

domain_renew() Acces denied :!:

Renew operation is denied in case of the following domain status:

  
clientRenewProhibited
serverRenewProhibited
clientUpdateProhibited
serverUpdateProhibited
pendingCreate
pendingDelete
pendingRenew  
pendingTransfer
pendingUpdate

PHP Example:

    /* Renouvellement d'un domain name -------------------------------- */
 
    $period = 5; // Renouvellement pour 5 ans
 
    echo "domain_renew() \n";
    $result = $client->domain_renew( $dist_id, $dist_passwd, $newdomain['domain'], $period );
    print_r( $result );
 
    if ( $result['retcode'] != 1 )
        die( "Ca ne fonctionne pas !" );
 
    $tid = $result['retfields']['tid'];
    echo "api_status() transaction $tid\n";
    $result = $client->api_status( $dist_id, $dist_passwd, $tid );
    print_r( $result );

Perl Example:

    # Renouvellement d'un domain name
 
    print "domain_renew()\n";
    my $period = 5; # Renouvellement pour 5 ans;
 
    $result = $client->domain_renew( $dist_id, $dist_passwd, $newdomain{'domain'}, $period );
    
    print Data::Dumper->Dump([$result->result]);
    if ($result->result->{'retcode'} !=1)
    {
        die "Ca ne fonctionne pas !\n";
    };
    
    $tid = $result->result->{'retval'};

Prototype:

function domain_update( $dist_id, $dist_passwd, $domain, $array_domain )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2
-1 -3 Missing elements in array $array_domain
-1 -4 owner_id or admin_id or tech_id or bill_id was not usable
-1 -5 Domain name undefined
-1 -6 DNS was not properly setup for .FR (check: http://www.afnic.fr/outils/zonecheck/)
-1 -7 Invalid DNS or DNS Zone for .FR invalid ZoneCheck
0 0 Domain name doesn’t exist in our database
1 TID (OK check ‘tid’ transaction ID used by api_status() )

[retcode] => 1
[retval] => 278
[retfields] => Array
    (
        [tid] => 278
    )

domain_update() Acces denied :!:

admin_id / tech_id / bill_id are updatable only if  $dist_id == $owner_id or $dist_id == $admin_id
 
Update operation is denied in case of the following domain status:
  
clientUpdateProhibited
serverUpdateProhibited
pendingCreate
pendingDelete
pendingRenew
pendingTransfer
pendingUpdate

PHP Example:

    /* Update d'un domain name ---------------------------------------- */
 
    // un exemple de $newdomain est defini dans domain_create
    $upddomain = $newdomain;
    // il est possible de definir jusqu'a 13 DNS
    $upddomain['ns1'] = "ns0.free.org";
    $upddomain['ns2'] = "ns1.free.org";
    // Changement de contact Technique
    $upddomain['tech_id'] = $tech_id;
    // Changement de contact de Billing
    $upddomain['bill_id'] = $bill_id;
    // 64 = Transfer Prohibited, 0 = Transfer Granted
    $upddomain['registry_status'] = 64;
    // Changement de l'AuthCode EPP
    $upddomain['authinfo'] = "NewEPPcode";
 
    echo "domain_update() \n";
    $result = $client->domain_update( $dist_id, $dist_passwd, 
        $newdomain['domain'], $upddomain );
    print_r( $result );
 
    if ( $result['retcode'] != 1 )
        die( "Ca ne fonctionne pas !" );
 
    $tid = $result['retfields']['tid'];
    echo "api_status() transaction $tid\n";
    $result = $client->api_status( $dist_id, $dist_passwd, $tid );
    print_r( $result );

Perl Example:

    # Update d'un domain name
 
    print "domain_update()\n";
 
    my %upddomain = %newdomain;
 
    $upddomain{'ns2'} = "ns0.free.org";
    $upddomain{'ns3'} = "ns1.free.org";
    $upddomain{'ns4'} = "ns0.proxad.net";
    $upddomain{'ns5'} = "ns1.proxad.net";
    $upddomain{'tech_id'} = $tech_id;
    $upddomain{'bill_id'} = $bill_id;
 
    $result = $client->domain_update( $dist_id, $dist_passwd, 
        $newdomain{'domain'}, SOAP::Data->type(map => \%upddomain) );
 
    print Data::Dumper->Dump([$result->result]);
 
    if ($result->result->{'retcode'} !=1)
    {
        die "Ca ne fonctionne pas !\n";
    };
 
    $tid = $result->result->{'retval'};

Prototype:

function domain_delete( $dist_id, $dist_passwd, $domain )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2
-1 -3 There’s allready a delete command in process for this domain name
-1 -4 Domain name undefined
0 0 Domain name doesn’t exist in our database
1 TID (OK check ‘tid’ transaction ID used by api_status() )

PHP Example:

    /* Delete d'un domain name ---------------------------------------- */
 
    echo "domain_delete() \n";
    $result = $client->domain_delete( $dist_id, $dist_passwd, $newdomain['domain'] );
    print_r( $result );
 
    if ( $result['retcode'] == 1 ) {
        $tid = $result['retfields']['tid'];
 
        echo "api_status() transaction $tid\n";
        $result = $client->api_status( $dist_id, $dist_passwd, $tid );
        print_r( $result );
        }

Perl Example:

    # Delete d'un domain name
 
    print "domain_delete()\n";
    $result = $client->domain_delete( $dist_id, $dist_passwd, $newdomain{'domain'} );
    print Data::Dumper->Dump([$result->result]);
    
    if ($result->result->{'retcode'} !=1)
    {
        die "Ca ne fonctionne pas !\n";
    };
 
    $tid = $result->result->{'retval'};

Prototype:

function domain_info( $dist_id, $dist_passwd, $domain )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2 $dist_id is not Owner/Admin/Tech/Bill contact (permission denied)
-1 -3 Domain name undefined
0 0 Domain name doesn’t exist in our database
1 ID (OK, ID = domain_id + array retfields[])

[retcode] => 1
[retval] => 141958
[retfields] => Array
    (
        [id] => 141958
        [lastupdate] => 2006-09-26 21:43:10
        [lastupdate_ip] => 88.191.249.162
        [domain] => demo-now-1159299779.com
        [registrar_creation] => 2006-09-26 21:43:10
        [registrar_expiration] => 2010-09-26 21:43:10
        [authinfo] => hqruzKPTYZ13
        [service] => dns
        [ip_dns_master] => 
        [status] => Active
        [registry_status] => 64
        [ns0] => ns0.free.org
        [ns1] => ns1.free.org
        [ns2] => ns3.free.org
        [bill_id] => 127743
        [tech_id] => 127743
        [admin_id] => 13490
        [owner_id] => 151049
    )

PHP Example:

    /* Information a propos d'un domain name -------------------------- */
 
    echo "domain_info()\n";
    $result = $client->domain_info( $dist_id, $dist_passwd, $newdomain['domain'] );
    print_r( $result );

Perl Example:

    # Information a propos d'un domain name
 
    print "domain_info()\n";
    $result = $client->domain_info( $dist_id, $dist_passwd, $newdomain{'domain'} );
    print Data::Dumper->Dump([$result->result->{'retfields'}]);

Prototype

function domain_list( $dist_id, $dist_passwd, $role )

If $role is empty it’s default value is “Owner Admin Tech Bill” (all domain names where $dist_id is owner/admin/tech/bill contact) you can limit the list to one or several type of contact.

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid

Return array with domain name and registry expiration date from unix timestamp.

PHP Example:

    /* Liste des domaines (et date d'expiration) dont le reseller ------- */
    /* $dist_id est l'un des contacts (Owner/Admin/Tech/Bill) ------------ */
 
    echo "domain_list() contact $dist_id\n";
    $result = $client->domain_list( $dist_id, $dist_passwd );
    print_r( $result );

Perl Example:

    # Liste des domaines (et date d'expiration) dont le reseller
    # $dist_id est l'un des contacts (Owner/Admin/Tech/Bill)
 
    print "domain_list() contact $dist_id\n";
    $result = $client->domain_list( $dist_id, $dist_passwd );
    print Data::Dumper->Dump([$result->result->{'retfields'}]);

Prototype:

function domain_transfer( $dist_id, $dist_passwd, $domain, $authkey, $extid )

$extid is a contact_id, it’s only used in case of .FR transfert, it’s useless for other TLDs.

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2 Domain name status is Pending...
-1 -3 Domain name locked (locker/transfer/update prohibited)
-1 -4 Whois parsing error
-1 -5 login_id error
-1 -6 acces denied or invalid authkey
-1 -7 TLD not managed by API
-1 -8 Domain name created less than 2 month ago
-1 -9 Undefined authkey
-1 -10 $extid is invalid or undefined in case it’s can’t be omited
1 TID (check ‘tid’ and ‘owner_id’)

In case of transfert failure (invalide authkey, no vote reply, invalid email in whois, etc.) it’s possible to restart the transfert with ‘domain_transfer()’ command. This operation will not be billed.

WARNING: for gTLD (.COM .NET .ORG .BIZ .INFO .NAME .US) domain_transfer() send an e-mail to require a transfer validation to owner/admin contact email available in whois database. This e-mail is sent with From: and URL: provided at API registration by reseller.

PHP Example:

    /* Transfert d'un domain name ------------------------------------- */
    /* ATTENTION: pour les gTLD envoi un e-mail de demande d'acceptation   */
    /* du transfert au titulaire et admin contact du domain name        */
 
    $domain = "un-de-mes-domaines.com";
    $authkey = "1234secret5678";
    $result = $client->domain_transfer( $dist_id, $dist_passwd, $domain, $authkey );
    print_r( $result );
 
    /* relance un transfert */
    $authkey = "NewSecret5678";
    $result = $client->domain_transfer( $dist_id, $dist_passwd, $domain, $authkey );
    print_r( $result );

Perl Example:

    # Transfert d'un domain name
 
    print "domain_transfer() wazabi.net\n";
    $result = $client->domain_transfer( $dist_id, $dist_passwd, 
        "un-de-mes-domaines.com", SOAP::Data->type(string =>"123secret456") );
 
    if ($result->result->{'retcode'} !=1)
    {
        die "Ca ne fonctionne pas !\n";
    };
    $tid = $result->result->{'retval'};

Prototype

function domain_trade( $dist_id, $dist_passwd, $domain, $newowner_id )

$newowner_id is the contact id of the new owner.

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2 Domain name undefined
-1 -3 Domain name not in database
1 TID (OK check tid transaction ID with api_status() )

Prototype

function domain_restore( $dist_id, $dist_passwd, $domain )

This function is only usable with the following TLD : .COM .NET .ORG .EU .BE et .FR

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2 Domain name undefined
-1 -3 Domain name not in database
-1 -4 Unable to use domain_restore for this TLD
-1 -5 Unable to Restore (domain name archive unavailable)
-1 -6 Unable to Restore (period/date problem)
1 TID (OK check tid transaction ID with api_status() )


Services management (email forward, web redir and custom dns)

WARNING: if you use redir or custom dns services, the DNS will be automaticly updated by our own DNS.

Typage

function service_redir_create( $dist_id, $passwd, $domain, $type, $source, $destination )

Return values:

retcode retval Comment
-1 -1 Invalid $dist_id or $dist_passwd
-1 -2 Access denied $dist_id is not $domain owner/admin/tech contact
-1 -3 Invalid $source or $destination
1 n ok

$type must be one of the following values :

'web'  for web redirect
'web302' for web redirect (de type 302)
'web301' for web redirect (de type 301)
'rweb' for web redirect with frame
'mail' for mail forward

 If $type == 'web' or 'rweb'

  'source' must have format: http://qqchose.mondomaine.tld
  'destination' must have format: http://sous-domaine.domaine.tld/repertoire/fichier.html
  
  destination can be http,https or ftp URL
 
 If $type == 'email'

  'source' format is : webmaster@mondomaine.tld
  'destination' must be a valid email : mon.nom@monfai.tld

  source and destination must have a valid syntax (check RFC)
  a A or MX must existe for destination domain name.

Typage

function service_redir_list( $dist_id, $passwd, $domain, $type )

Return values:

retcode retval Comment
-1 -1 Invalid $dist_id or $dist_passwd
1 1 OK (redirection list is in ‘retfields’)

$type must be one of the following values :

'web'  for web redirect
'rweb' for web redirect with frame
'mail' for mail forward

Redirection list is in ‘retfields’ example:

  [retfields] => Array
      (
          [http://create.registrarfrance.com] => http://www.bookmyname.com/create.cgi
          [http://blog.registrar.com]         => http://blog.bookmyname.com/parlerpournedire.html
      )

Typage

function service_redir_delete( $dist_id, $passwd, $domain, $type, $source, $destination )

Return values:

retcode retval Comment
-1 -1 Invalid $dist_id or $dist_passwd
-1 -2 Access denied $dist_id is not $domain owner/admin/tech contact
-1 -3 There’s no redirect $type,$source,$destination
1 1 OK (Redirection has been removed)

$type must be one of the following values :

'web'  for web redirect
'rweb' for web redirect with frame
'mail' for mail forward

Typage

function service_dns_custom_get( $dist_id, $passwd, $domain )

Return values:

retcode retval Comment
-1 -1 Invalid $dist_id or $dist_passwd
-1 -2 We do not manage $domain
-1 -3 Access denied $dist_id is not $domain owner/admin/tech contact
1 1 OK (custom DNS entry is in ‘retfields’)

PHP Example:

    $domain = "customdns-domain-name.com";
    $result = $client->service_dns_custom_get( $dist_id, $dist_passwd, $domain );
    if ( $result['retcode'] == -1 ) {
        // error
        }
    print_r( $result );

DNS zone entry are in ‘retfields’ example:

  [retfields] => Array
      (
          [0] => Array
              (
                  [name] => blog
                  [ttl] => 28800
                  [type] => CNAME
                  [value] => dublabla.registrarfrancais.com.
              )
          [1] => Array
              (
                  [name] => www
                  [ttl] => 28800
                  [type] => A
                  [value] => 88.191.249.162
              )
          [2] => Array
              (
                  [name] => ipv6-free
                  [ttl] => 28800
                  [type] => AAAA
                  [value] => 2a01:5d8:e200::1
              )
)

Typage

function service_dns_custom_set( $dist_id, $passwd, $domain, $zone )

Return values:

retcode retval Comment
-1 -1 Invalid $dist_id or $dist_passwd
-1 -2 We do not manage $domain
-1 -3 Access denied $dist_id is not $domain owner/admin/tech contact
-1 -4 Invalid DNS zone content in $zone
1 n OK (n=zone entry number)

DNS zone in $zone, can have the following record type: A MX NS CNAME AAAA WKS TXT SRV

PHP Example:

    $domain = "customdns-domain-name.com";
    $zone = "www A 88.191.249.162\nmail A 88.191.249.132\n".$domain.". MX 10 mail\n";
    $result = service_dns_custom_set($dist_id, $dist_passwd, $domain, $zone);


Hosts management (glue record)

Prototype

function host_create( $dist_id, $passwd, $hostname, $array_ip )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2 invalid IP
-1 -3 invalid $hostname
-1 -4 We do not manage domain for this hostname
-1 -5 Domain name access denied for $dist_id
-1 -6 glue allready exist (⇒ update instead of create)
1 TID ok + retfield

PHP Example:

    /* Creation d'une glue record sur un domain name que l'on gere ---- */
 
    /* glue record a plusieurs IPs */
    $array_ip = array ( "88.191.249.1", "88.191.249.2", "88.191.249.3" );
    $hostname = "glue1.".$domain;
 
    echo "host_create() $hostname\n";
    $result = $client->host_create( $dist_id, $dist_passwd, $hostname, $array_ip );
    print_r( $result );
 
    $array_ip = array ( "88.191.249.4", "88.191.249.5" );
    $hostname = "glue2.".$domain;
    echo "host_create() $hostname\n";
    $result = $client->host_create( $dist_id, $dist_passwd, $hostname, $array_ip );
    print_r( $result );
 
    /* le cas le plus frequent, juste une IP pour la glue */
    $array_ip = array ( "88.191.249.6" );
    $hostname = "glue3.".$domain;
    echo "host_create() $hostname\n";
    $result = $client->host_create( $dist_id, $dist_passwd, $hostname, $array_ip );
    print_r( $result );
 
    /* glue directement sur le domain name */
    $array_ip = array ( "88.191.249.7" );
    $hostname = $domain;
    echo "host_create() $hostname\n";
    $result = $client->host_create( $dist_id, $dist_passwd, $hostname, $array_ip );
    print_r( $result );

Perl Example:

    # creation d'un host
 
    my $hostname;
    print "host_create()\n";
    $hostname = "ns1test-$$.bookmyname.com";
    print "ns1test-$$.bookmyname.com\n";
    my @ips =  ("88.191.249.1","88.191.249.2", "88.191.249.3" );
    $result = $client->host_create( $dist_id, $dist_passwd, 
        $hostname, SOAP::Data->type(Array => \@ips));
    if ($result->result->{'retcode'} !=1)
    {
        print Data::Dumper->Dump([$result->result]);
        die "Ca ne fonctionne pas !\n";
    };
    $tid = $result->result->{'retval'};

Prototype:

function host_update( $dist_id, $passwd, $hostname, $array_ip )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2 invalid IP
-1 -3 invalid $hostname
-1 -4 We do not manage domain for this hostname
-1 -5 Domain name access denied for $dist_id
-1 -6 There’s no glue record for this hostname
1 TID ok + retfield

PHP Example:

    /* Update d'une glue ------------------------------------------------- */
 
    $hostname = "glue3.".$domain;
    $array_ip = array ( "88.191.249.6", "88.191.249.5", "88.191.249.4" );
    echo "host_update() $hostname\n";
    $result = $client->host_update( $dist_id, $dist_passwd, $hostname, $array_ip );
    print_r( $result );

Perl Example:

    # update d'un host
 
    print "host_update()\n";
    my @ips =  ("88.191.249.6");
 
    $result = $client->host_update( $dist_id, $dist_passwd, $hostname, 
        SOAP::Data->type(Array => \@ips));
    if ($result->result->{'retcode'} !=1)
    {
        print Data::Dumper->Dump([$result->result]);
        die "Ca ne fonctionne pas !\n";
    };
    $tid = $result->result->{'retval'};

Prototype:

function host_delete( $dist_id, $passwd, $hostname )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -3 invalid $hostname
-1 -4 We do not manage domain for this hostname
-1 -5 Domain name access denied for $dist_id
-1 -6 There’s no glue record for this hostname
1 TID ok + retfield

PHP Example:

    /* Delete glue record ------------------------------------------------- */
 
    $hostname = "glue2.".$domain;
    echo "host_delete() $hostname\n";
    $result = $client->host_delete( $dist_id, $dist_passwd, $hostname );
    print_r( $result );

Perl Example:

    # host delete
 
    print "host_delete()\n";
    $result = $client->host_delete( $dist_id, $dist_passwd, $hostname );
 
    if ($result->result->{'retcode'} !=1)
    {
        print Data::Dumper->Dump([$result->result]);
        die "Ca ne fonctionne pas !\n";
    };
    $tid = $result->result->{'retval'};

Prototype:

function host_list( $dist_id, $passwd, $domain )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2 Access right problem ($dist_id must be owner/admin/tech for $domain)
-1 -3 $domain undefined
-1 -4 $domain doesn’t exist

Prototype:

function host_info( $dist_id, $passwd, $hostname )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
-1 -2 no $hostname
1 HID $hostid + info in retfields[]

[retcode] => 1
[retval] => 13128
[retfields] => Array
    (
        [id] => 13128
        [hostname] => glue2.demo-now-1159299779.com
        [lastupdate] => 2006-09-26 21:43:10
        [ip0] => 88.191.249.4
        [ip1] => 88.191.249.5
    )

PHP Example:

    /* Domain name glue record list ------------------------ */
 
    echo "host_list() \n";
    $result = $client->host_list( $dist_id, $dist_passwd, $domain );
    print_r( $result );
 
    if ( $result['retcode'] != 1 )
        die( "Ca ne fonctionne pas !" );
 
    /* Information sur les IPs d'un hostname qui a une glue -------------- */
 
    $gluelist = $result['retfields'];
    for( $i=0; $i<count($gluelist); $i++ ) {
        $hostname = $gluelist[$i]['hostname'];
        echo "host_info() $hostname\n";
        $result = $client->host_info( $dist_id, $dist_passwd, $hostname );
        print_r( $result );
        }

Perl Example:

    # Les hosts d'un domaine et leurs ips
    # Hosts List && host_info
 
    print "host_list()\n";
    $result = $client->host_list($dist_id, $dist_passwd, 'bookmyname.com');
 
    if ($result->result->{'retcode'} !=1)
    {
        print Data::Dumper->Dump([$result->result]);
        die "Ca ne fonctionne pas !\n";
    };
    foreach my $host (map { $_->{'hostname'} } @{$result->result->{'retfields'}})
    {
        print "$host\n";
        $result = $client->host_info($dist_id, $dist_passwd,$host);
        if($result->result->{'retcode'} ==1)
        {
            print Data::Dumper->Dump([$result->result->{'retfields'}]);
        };
    };


API dedicated functions

Prototype:

function api_status( $dist_id, $dist_passwd, $tid )

Return values:

retcode retval Comment
-1 -1 $dist_id or $dist_passwd invalid
0 0 Pas de transaction pour le TID fourni
1 TID (aussi ‘tid’ avec le numero de transaction)

return retfields[] array

      Example for domain_create() in creating state:

      [retfields] => Array
          (
              [tid] => 375
              [transaction_id] => 375
              [lastupdate] => 2006-10-04 17:04:56
              [requestdate] => 2006-10-04 17:04:56
              [action] => Create
              [reply_value] => 0
              [reply_msg] =>
              [period] => 1
              [type] => Domain
              [status] => ToProcess
          )

      content can be:

      for 'reply_value' et 'reply_msg': messages fourni par le registre 
             (verisign, pir, afilias, gnr, neulevel, dns.be, eurid, etc.)

      for 'status': enum('Wait','ToProcess','Done','Error');

      for 'type'  : enum('Contact','Domain','Host','Other');

      for 'action': enum('Create','Renew','Update','Delete','Restore',
                          'TransferRequest','TransferCancel',
                          'TransferApprove','TransferReject' );

Delay for processing transaction is from few seconds (in large majority of case) to serverals minutes or hours when registry are in maintenance. (for few registry there’s maintenance every weeks)

PHP Example:

    /* api_status (pour connaitre l'etat d'une operation (fini,etc.) ----- */
 
    $tid = $transaction_id; // souvent present dans $result['retfields']['tid'];
    echo "api_status() transaction $tid\n";
    $result = $client->api_status( $dist_id, $dist_passwd, $tid );
    print_r( $result );

Perl Example:

    # api_status (pour savoir lorsque l'operation est fini)
 
    print "api_status() transaction $tid\n";
 
    $result = $client->api_status( $dist_id, $dist_passwd, $tid );
    print Data::Dumper->Dump([$result->result]);

Prototype:

function api_paysid( $dist_id, $dist_passwd )

Return values:

retcode retval Comment
1 n (n=nombre de pays)

PHP Example:

    // liste les pays_id (utilise pour les contacts)
    $result = $client->api_paysid(); 
    print_r( $result );

Perl Example:

    # liste les pays_id (utilise pour les contacts)
    $result = $client->api_paysid();
    if ($result->result->{'retcode'}==1)
    {
        for (my $cpt=0;$cpt<$result->result->{'retval'};++$cpt)
        {
            print Data::Dumper->Dump([$result->result->{'retfields'}->[$cpt]]);
        };
    };

Prototype:

function api_regionsid( $dist_id, $dist_passwd )

Return values:

retcode retval Comment
1 n (n=nombre de régions)

PHP Example:

    // liste les regions_id (utilise pour les contacts)
    $result = $client->api_regionsid();
    print_r( $result );

Perl Example:

    # liste les regions_id (utilise pour les contacts)
 
    $result = $client->api_regionsid();
    if ($result->result->{'retcode'}==1)
    {
        for (my $cpt=0;$cpt<$result->result->{'retval'};++$cpt)
        {
            print Data::Dumper->Dump([$result->result->{'retfields'}->[$cpt]]);
        };
    };

Copyright

2006-2009 © BookMyName

Contact us:

 
domain-name-reseller.txt · Last modified: 2010/05/20 12:31
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki