EnomService class This class contains all the functions which will translate their passed parametrs into commands to be executed on Enom's servers.
|
EnomService has no properties.
addIDProtectService| PHP | string addIDProtectService(string $domainName, integer $numYears) |
|---|
Add ID Protect service to a domain name
Executes the 'PurchaseServices' command on Enom's servers, to add the ID Protect service to an active domain name that belongs to your Enom Account.
Arguments
Must be active and belongs to your Enom account.
Number of years to subscribe to ID Protect. Permitted values are 1 to 10.
Return
Order ID, or false if failed.
checkDomain| PHP | array checkDomain(string $sld, string $tld, boolean $spinner, boolean $allowDash, string $word1, string $word2, string $word3) |
|---|
Check domain availability
Executes the 'Check' command on Enom's servers to check domain availability. Top-level domain name (extension) Permitted values are:
Arguments
Second-level Domain
Top-level Domain (also known as Domain Extension).
If true, DomainSpinner (Domain Suggestion) will be enabled
If DomainSpinner is enabled and $allowDash set to true, Suggested domain names may contain Dashes
If DomainSpinner is enabled and $word1 is set, Suggested domain names may contain this word
If DomainSpinner is enabled and $word2 is set, Suggested domain names may contain this word
If DomainSpinner is enabled and $word3 is set, Suggested domain names may contain this word
Return
An associative array containing the domain name as a key and a bool (true if domain is available, false otherwise) as a value. On error, it returns false
getDomainContacts| PHP | array getDomainContacts(string $domainName) |
|---|
Get domain contacts for a domain name.
Executes the 'GetContacts' command on Enom's servers, to retrive the contacts information for a domain name that is active and belongs to your Enom account.
| See also |
|---|
| EnomService::setDomainContacts() |
Arguments
Must be active and belongs to your Enom account.
Return
Associative array containing contacts information.
getDomainHosts| PHP | array getDomainHosts(string $domainName) |
|---|
Get domain hosts (records) for a domain name.
Executes the 'GetHosts' command on Enom's servers, to get domain hosts (records) for a domain name that is active and belongs to your Enom account.
| See also |
|---|
| EnomService::setDomainHosts() |
Arguments
Must be active and belongs to your Enom account.
Return
Associative array containing all Hosts being set. Array keys are name, type, address and pref.
getDomainNameID| PHP | long getDomainNameID(string $domainName) |
|---|
Get domain name ID for a domain name.
Executes the 'GetDomainNameID' command on Enom's servers, to get the domain name ID number for a domain name that belongs to your Enom account. Can be used to verify that domain name belongs to your Enom's account.
Arguments
Must be valid and belongs to your Enom account.
Return
Domain name ID number, or false if failed.
getEmailForwarders| PHP | array getEmailForwarders(string $domainName) |
|---|
Get email forwarders for a domain name.
Executes the 'GetForwarding' command on Enom's servers, to get email forwarders for a domain name that is active and belongs to your Enom account.
| See also |
|---|
| EnomService::setEmailForwarders() |
Arguments
Must be active and belongs to your Enom account.
Return
Associative array containing 'Email account' as the key, and 'Forward To' as the value.
getExpiryDate| PHP | string getExpiryDate(string $domainName) |
|---|
Get expiry date for a domain name
Executes the 'GetDomainExp' command on Enom's servers, to retrive the expiration date of a domain name that is active and belongs to your Enom account.
| See also |
|---|
| EnomService::getDomainNameID() |
Arguments
Must be active and belongs to your Enom account.
Return
Expiration date, or false on fail
getNameMyPhone| PHP | array getNameMyPhone(string $domainName) |
|---|
Get the current name-my-phone settings.
Executes the 'GetDomainPhone' command on Enom's servers, to get current name-my-phone settings for a domain name that is active and belongs to your Enom account.
| See also |
|---|
| EnomService::setNameMyPhone() |
Arguments
Must be valid and belongs to your Enom account.
Return
Associative array containing name-my-phone settings.
getNameServers| PHP | array getNameServers(string $domainName) |
|---|
Get name servers for a domain name.
Executes the 'GetDNS' command on Enom's servers, to retrive the name servers for a domain name that is active and belongs to your Enom account.
| See also |
|---|
| EnomService::getNameServers() |
Arguments
Must be active and belongs to your Enom account.
Return
An array containing name servers. If using Enom's name servers, the array will be empty.
getRegistrarLock| PHP | boolean getRegistrarLock(string $domainName) |
|---|
Get registrar lock status for a domain name
Executes the 'GetRegLock' command on Enom's servers.
| See also |
|---|
| EnomService::setRegistrarLock() |
Arguments
Must be active and belongs to your Enom account.
Return
True if not locked, false otherwise. You should check for $this->isError if returned false, to make sure it's not an error flag not the registrar lock status.
registerDomain| PHP | long registerDomain(string $domainName, integer $numYears, array $contacts, array $nameServers, boolean $regLock) |
|---|
Register a new domain name
Executes the 'Purchase' command on Enom's servers to register a new domain. Note that this command to not fail, it must meet the following requirements:
| See also |
|---|
| EnomService::renewDomain() |
| EnomService::transferDomain() |
Arguments
Must be a valid domain name, that is currently available
Some TLDs like .co.uk requires minimum of 2 years, Another may require 10 years
Associative array containing Contacts as key and value.
If not set, Enom's Default name servers will be used instead.
A flag that specifies if the domain should be locked or not. Default is true.
Return
Order ID, or false if failed.
renewDomain| PHP | long renewDomain(string $domainName, integer $numYears) |
|---|
Renew a domain name that belongs to your Enom account
Executes the 'Extend' command on Enom's servers to renew a domain name which was previously registered or transfered to your Enom account. Note that this command to not fail, it must meet the following requirements:
| See also |
|---|
| EnomService::registerDomain() |
| EnomService::transferDomain() |
Arguments
Must be a valid and active domain name.
The new expiration date cannot be more than 10 years in the future.
Return
Renewal Order ID, or false if failed.
setDomainContacts| PHP | boolean setDomainContacts(string $domainName, array $contacts) |
|---|
Set domain contacts for a domain name.
Executes the 'Contacts' command on Enom's servers, to set the contacts information for a domain name that is active and belongs to your Enom account.
| See also |
|---|
| EnomService::getDomainContacts() |
Arguments
Must be active and belongs to your Enom account.
Associative array containing contacts information.
Return
True if succeed and false if failed.
setDomainHosts| PHP | boolean setDomainHosts(string $domainName, array $domainHosts) |
|---|
Set domain hosts (records) for a domain name.
Executes the 'SetHosts' command on Enom's servers, to set domain hosts (records) for a domain name that is active and belongs to your Enom account.
| See also |
|---|
| EnomService::getDomainHosts() |
Arguments
Must be active and belongs to your Enom account.
Associative array containing all Hosts to set. Array keys are name, type, address and pref.
Return
True if succeed and False if failed.
setEmailForwarders| PHP | boolean setEmailForwarders(string $domainName, array $emailForwarders) |
|---|
Set email forwarders for a domain name.
Executes the 'Forwarding' command on Enom's servers, to set email forwarders for a domain name that is active and belongs to your Enom account.
| See also |
|---|
| EnomService::getEmailForwarders() |
Arguments
Must be active and belongs to your Enom account.
Associative array containing 'Email account' as the key, and 'Forward To' as the value.
Return
True if succeed and False if failed.
setNameMyPhone| PHP | setNameMyPhone(string $domainName, string $phone, string $hostName, integer $serviceID, integer $templateID, boolean $emailAlias, string $ccEmail1, string $ccEmail2, string $ccEmail3) |
|---|
Arguments
setNameServers| PHP | boolean setNameServers(string $domainName, array $nameServers) |
|---|
Set name servers for a domain name.
Executes the 'ModifyNS' command on Enom's servers, to set the name servers for a domain name that is active and belongs to your Enom account.
| See also |
|---|
| EnomService::getNameServers() |
Arguments
Must be active and belongs to your Enom account.
Array containing name servers. If not set, default Enom name servers will be used.
Return
True if succeed and false if failed.
setRegistrarLock| PHP | boolean setRegistrarLock(string $domainName, boolean $unlockRegistrar) |
|---|
Set registrar lock status for a domain name
Executes the 'SetRegLock' command on Enom's servers.
| See also |
|---|
| EnomService::getRegistrarLock() |
Arguments
Must be active and belongs to your Enom account.
If set to true, the domain will be unlocked.
Return
True if succeed, false on fail.
synchronizeEPP| PHP | boolean synchronizeEPP(string $domainName, bool $sendEmail [optional, default value = true], bool $runSynch [optional, default value = true]) |
|---|
Create a new EPP key, synchronize the key with the Registry, and email it to the registrant.
Executes the 'SynchAuthInfo' command on Enom's servers, to create a new EPP key for a domain name that belongs to your Enom account, synchronize the key with the Registry, and optionally email it to the registrant.
Arguments
Must be valid and belongs to your Enom account.
Should mail the EPP key to the registrant? (default is true).
Should synchronize the EPP key and make sure Enom's records are identical to the Registry's? (default is true).
Return
True if succeed and False if failed.
transferDomain| PHP | long transferDomain(string $domainName, array $contacts, string $authCode, boolean $regLock) |
|---|
Transfer a domain name to your Enom account
Executes the 'TP_CreateOrder' command on Enom's servers to transfer a domain name to your Enom account. Note that this command to not fail, it must meet the following requirements:
| See also |
|---|
| EnomService::registerDomain() |
| EnomService::renewDomain() |
Arguments
Must be a valid domain name, that is currently available
Associative array containing Contacts as key and value.
Authorization key from the Registrar. Required for EPP names.
A flag that specifies if the domain should be locked or not. Default is true.
Return
Transfer Order ID, or false if failed.