public function modifyNs(Registrar_Domain $domain) { $this->getLog()->debug('Modifying nameservers: ' . $domain->getName()); $this->getLog()->debug('Ns1: ' . $domain->getNs1()); $this->getLog()->debug('Ns2: ' . $domain->getNs2()); $this->getLog()->debug('Ns3: ' . $domain->getNs3()); $this->getLog()->debug('Ns4: ' . $domain->getNs4()); return true; }
public function modifyNs(Registrar_Domain $domain) { $params = array('domain' => $domain->getName()); $nsList = array(); $nsList[] = $domain->getNs1(); $nsList[] = $domain->getNs2(); $nsList[] = $domain->getNs3(); $nsList[] = $domain->getNs4(); $params['ns_list'] = implode(',', $nsList); $result = $this->_process('/Domain/Update', $params); return $result['status'] == 'SUCCESS'; }
public function modifyNs(Registrar_Domain $domain) { $ns = array(); $ns[] = $domain->getNs1(); $ns[] = $domain->getNs2(); if ($domain->getNs3()) { $ns[] = $domain->getNs3(); } if ($domain->getNs4()) { $ns[] = $domain->getNs4(); } $params = array('order-id' => $this->_getDomainOrderId($domain), 'ns' => $ns); $result = $this->_makeRequest('domains/modify-ns', $params, 'POST'); return $result['status'] == 'Success'; }
public function modifyNs(Registrar_Domain $domain) { $ns = array(); $ns[] = $domain->getNs1(); $ns[] = $domain->getNs2(); if ($domain->getNs3()) { $ns[] = $domain->getNs3(); } if ($domain->getNs4()) { $ns[] = $domain->getNs4(); } $params = array('domain_id' => $this->_getDomainOrderId($domain), 'ns' => implode(",", $ns)); $result = $this->_makeRequest('domains/' . $this->_getDomainOrderId($domain) . '/ns', $params, 'PUT'); return $result == $ns; }
public function registerDomain(Registrar_Domain $domain) { $c = $domain->getContactRegistrar(); $params = array('domain' => $domain->getName(), 'period' => $domain->getRegistrationPeriod() . 'Y'); // Add nameservers $nsList = array(); $nsList[] = $domain->getNs1(); $nsList[] = $domain->getNs2(); if ($domain->getNs3()) { $nsList[] = $domain->getNs3(); } if ($domain->getNs4()) { $nsList[] = $domain->getNs4(); } $params['ns_list'] = implode(',', $nsList); // Set contact data foreach (array('Registrant', 'Admin', 'Technical', 'Billing') as $contactType) { $params[$contactType . '_Organization'] = $c->getCompany(); $params[$contactType . '_FirstName'] = $c->getFirstName(); $params[$contactType . '_LastName'] = $c->getLastName(); $params[$contactType . '_Email'] = $c->getEmail(); $params[$contactType . '_PhoneNumber'] = '+' . $c->getTelCc() . '.' . $c->getTel(); $params[$contactType . '_Street'] = $c->getAddress1(); $params[$contactType . '_Street2'] = $c->getAddress2(); $params[$contactType . '_Street3'] = $c->getAddress3(); $params[$contactType . '_City'] = $c->getCity(); $params[$contactType . '_CountryCode'] = $c->getCountry(); $params[$contactType . '_PostalCode'] = $c->getZip(); $params[$contactType . '_Language'] = 'en'; } if ($domain->getTld() == '.asia') { $params['Registrant_DotAsiaCedLocality'] = $c->getCountry(); $params['Registrant_DotAsiaCedEntity'] = 'naturalPerson'; $params['Registrant_DotAsiaCedIdForm'] = 'passport'; } if ($domain->getTld() == '.fr' || $domain->getTld() == '.re') { $tm = rand(100000000, 999999999); $params['registrant_dotFRContactEntityType'] = 'OTHER'; $params['admin_dotFRContactEntityType'] = 'OTHER'; $params['registrant_dotFRContactEntityName'] = $c->getName(); $params['admin_dotFRContactEntityName'] = $c->getName(); $params['registrant_dotFROtherContactEntity'] = $c->getName(); $params['admin_dotFROtherContactEntity'] = $c->getName(); $params['registrant_dotFRContactEntityTrademark'] = $tm; $params['admin_dotFRContactEntityTrademark'] = $tm; } if ($domain->getTld() == '.it') { $params['Registrant_dotitEntityType'] = 1; $params['Registrant_dotitNationality'] = $c->getCountry(); $params['Registrant_dotitRegCode'] = $c->getDocumentNr(); $params['Registrant_dotitHideWhois'] = $domain->getPrivacyEnabled() ? 'YES' : 'NO'; $params['Registrant_dotitProvince'] = $c->getState(); for ($i = 1; $i < 5; $i++) { $params['Registrant_dotItTerm' . $i] = 'YES'; } $params['Registrant_clientIp'] = '1.1.1.1'; $params['Admin_dotitProvince'] = $c->getState(); $params['Technical_dotitProvince'] = $c->getState(); } if ($domain->getTld() == '.us') { $params['Registrant_usPurpose'] = 'P3'; $params['Registrant_usNexusCategory'] = 'C11'; } $result = $this->_process('/Domain/Create', $params); return $result['product_0_status'] == 'PENDING' || $result['product_0_status'] == 'SUCCESS'; }
/** * @param Registrar_Domain $domain * @return bool * @throws Registrar_Exception * @see https://www.namesilo.com/api_reference.php#registerDomain */ public function registerDomain(Registrar_Domain $domain) { $c = $domain->getContactRegistrar(); $params = array('domain' => $domain->getName(), 'years' => $domain->getRegistrationPeriod(), 'fn' => $c->getFirstName(), 'ln' => $c->getLastName(), 'ad' => $c->getAddress1(), 'ad2' => $c->getAddress2(), 'cy' => $c->getCity(), 'st' => $c->getState(), 'zp' => $c->getZip(), 'ct' => $c->getCountry(), 'em' => $c->getEmail(), 'ph' => $c->getTel()); if ($domain->getName() == '.us') { $params['usnc'] = 'C12'; $params['usap'] = 'P3'; } $params['ns1'] = $domain->getNs1(); $params['ns2'] = $domain->getNs2(); if ($domain->getNs3()) { $params['ns3'] = $domain->getNs3(); } if ($domain->getNs4()) { $params['ns4'] = $domain->getNs4(); } $result = $this->_request('registerDomain', $params); return true; }
public function registerDomain(Registrar_Domain $domain) { $domainname = $domain->getName(); $enduseremail = $domain->getContactRegistrar()->getEmail(); $monthsofregistration = $domain->getRegistrationPeriod() * 12; $nameservers = array(); if ($domain->getNs1()) { $nameservers[] = $domain->getNs1(); } if ($domain->getNs2()) { $nameservers[] = $domain->getNs2(); } if ($domain->getNs3()) { $nameservers[] = $domain->getNs3(); } if ($domain->getNs4()) { $nameservers[] = $domain->getNs4(); } $result = $this->domainshare_register($domainname, $enduseremail, $monthsofregistration, $nameservers); return $result['status'] == 'DOMAIN REGISTERED'; }
/** * Ubah NS domain * @return boolean */ public function modifyNs(Registrar_Domain $domain) { $ns = array(); $ns[] = $domain->getNs1(); $ns[] = $domain->getNs2(); if ($domain->getNs3()) { $ns[] = $domain->getNs3(); } if ($domain->getNs4()) { $ns[] = $domain->getNs4(); } $domain_id = $this->_getDomainOrderId($domain); $params['ns'] = implode(',', $ns); $result = $this->_makeRequest('domains/' . $domain_id . '/ns', $params, 'put'); if (is_array($result)) { $result['status'] = 'Success'; } return $result['status'] == 'Success'; }
public function registerDomain(Registrar_Domain $domain) { $params = array('Command' => 'namecheap.domains.create', 'DomainName' => $domain->getName(), 'AddFreeWhoisguard' => 'Yes', 'WGEnabled' => 'Yes', 'Years' => $domain->getRegistrationPeriod()); $types = array('Registrant', 'Tech', 'Admin', 'AuxBilling'); $contact = $domain->getContactRegistrar(); foreach ($types as $type) { $params[$type . 'FirstName'] = $contact->getFirstName(); $params[$type . 'LastName'] = $contact->getLastName(); $params[$type . 'Address1'] = $contact->getAddress1(); $params[$type . 'Address2'] = $contact->getAddress2(); $params[$type . 'Address3'] = $contact->getAddress3(); $params[$type . 'OrganizationName'] = $contact->getCompany(); $params[$type . 'JobTitle'] = $contact->getJobTitle(); $params[$type . 'City'] = $contact->getCity(); $params[$type . 'StateProvince'] = $contact->getState(); $params[$type . 'PostalCode'] = $contact->getZip(); $params[$type . 'Country'] = $contact->getCountry(); $params[$type . 'Phone'] = '+' . $contact->getTelCc() . '.' . $contact->getTel(); $params[$type . 'Fax'] = '+' . $contact->getFaxCc() . '.' . $contact->getFax(); $params[$type . 'EmailAddress'] = $contact->getEmail(); } $nameServers = array(); if (!is_null($domain->getNs1())) { $nameServers[] = $domain->getNs1(); } if (!is_null($domain->getNs2())) { $nameServers[] = $domain->getNs2(); } if (!is_null($domain->getNs3())) { $nameServers[] = $domain->getNs3(); } if (!is_null($domain->getNs4())) { $nameServers[] = $domain->getNs4(); } if (count($nameServers) > 0) { $params['Nameservers'] = implode(",", $nameServers); } $respond = $this->_call($params); if ($respond === false) { return false; } $status = $respond->CommandResponse->DomainCreateResult->attributes(); if (strtolower($status['Registered']) == 'true') { return true; } else { return false; } }