Closed sayoki closed 4 years ago
Does noboby know how to add nameservers?
The code looks fine, i just don't see the error message you are receiving in this Issue.
Weird. Unimplemented option: domain:hostObj not supported
I am getting the same message using the modifydomain.php script from the Examples folder.
I am trying to add nameservers to a .be domain.
DNS Belgium does not work with host objects, but with host attributes. That means that nameservers are not created als a separate object, but just added to domain names as Names and IP Addresses.
The modifydomain script in the Examples folder is a general script, it has to be modified when specific registries have specific rules.
In this case, because DNS Belgium uses Host Attributes, there is a fifth parameter, $forcehostattr, which you will have to set to true. Default value for this parameter is false.
function __construct($objectname, $addinfo = null, $removeinfo = null, $updateinfo = null, $forcehostattr=false, $namespacesinroot=true)
Thanks, it worked adding true as a extra parameter.
I get this answer while adding nameservers to a domain without nameservers. It did never work so far.
My code: $domain = new eppDomain($domainname); $add = new eppDomain($domainname); $add->addHost(new eppHost('ns1.nameserver.com')); $add->addHost(new eppHost('ns2.nameserver.com')); $update = new eppUpdateDomainRequest($domain, $add, $removeinfo = null, $mod = null); if ($response = $conn->request($update)) { echo $response->getResultMessage() . "\n"; }