User Guide and Documentation

register() - Domain Name RegistrationRelease Date: 2019/07/29

It is used to register the domain name.

Parameters;

  • $domain Full domain name, example: example.com
  • $sld Domain Name, example: example
  • $tld Extension of the domain name, example: com
  • $year Annual period of the domain name, example: 1 or 10
  • $dns Nameserver information of domain name, example: Array( [ns1] => ns1.example.com , [ns2] => ns2.example.com)
public function register($domain='',$sld='',$tld='',$year=1,$dns=[],$whois=[],$wprivacy=false){
    $domain   = idn_to_ascii($domain,0,INTL_IDNA_VARIANT_UTS46);
    $sld      = idn_to_ascii($sld,0,INTL_IDNA_VARIANT_UTS46);

    // This result should return if the domain name was registered successfully or was previously registered.

    $returnData = [
        'status' => "SUCCESS",
        'config' => [
            'entityID' => 1,
        ],
    ];

    if($wprivacy) $rdata["whois_privacy"] = ['status' => true,'message' => NULL];

    return $returnData;
}

$whois Whois information, example:

Array
(
    [Name] => John Doe
    [FirstName] => John
    [LastName] => Doe
    [Company] => WISECP
    [AddressLine1] => sample sample test sample test
    [AddressLine2] => test test
    [ZipCode] => 0000
    [State] => NY
    [City] => New York
    [Country] => US
    [PhoneCountryCode] => 1
    [Phone] => 2025550103
    [FaxCountryCode] => 1
    [Fax] => 2025550103
    [EMail] => myexample@gmail.com
)

$wprivacy Specifies Whois privacy status. Example: boolean(true | false)

Retrieval Value;

Array
(
    [status] => SUCCESS
    [config] => Array
        (
            [entittyID] => 1
        )

    [whois_privacy] => Array
        (
            [status] => boolean (true | false)
            [message] => 
        )

)
Copyright © 2019. All rights reserved.
Top