Developer Center

register() - Domain Name Registration

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
(
    [registrant] => 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] => [email protected]
    )

    [administrative] => 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] => [email protected]
    )
    [technical] => 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] => [email protected]
    )
    [billing] => 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] => [email protected]
    )
)

$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] => 
        )

)
questioning() - Domain Name Check transfer() - Domain Name Transfer

Do you have any questions?

Feel free to contact us
Contact Us
Copyright © 2024. All Rights Reserved.
Join Our Discord Channel
Top