metaregistrar / php-epp-client

Object-oriented PHP EPP Client
https://www.metaregistrar.com/docs/
MIT License
210 stars 153 forks source link

Unimplemented option #267

Closed sayoki closed 4 years ago

sayoki commented 4 years ago

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"; }

sayoki commented 4 years ago

Does noboby know how to add nameservers?

metaregistrar commented 4 years ago

The code looks fine, i just don't see the error message you are receiving in this Issue.

sayoki commented 4 years ago

Weird. Unimplemented option: domain:hostObj not supported

sayoki commented 4 years ago

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.

metaregistrar commented 4 years ago

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)
sayoki commented 4 years ago

Thanks, it worked adding true as a extra parameter.