register() – Alan Adı Tescil
Alan adının tescil edilebilmesi için kullanılır.
Parametreler;
- $domain Alan adının tam hali, örnek: example.com
- $sld Alan adının ismi, örnek: example
- $tld Alan adının uzantısı, örnek: com
- $year Alan adının yıllık periyodu, örnek: 1 veya 10
- $dns Alan adının nameserver bilgileri, örnek: 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 bilgileri, örnek:
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 Whois gizlilik durumunu belirtir. Örnek: boolean(true | false)
Geri Dönüş Değeri;
Array
(
[status] => SUCCESS
[config] => Array
(
[entittyID] => 1
)
[whois_privacy] => Array
(
[status] => boolean (true | false)
[message] =>
)
)