/** * Transfer a domain to the given user * * @param string $domain Domain name for transfer * @param array $nameservers The nameservers for the transfered domain * @param Whois $whois The contact information for the new owner, admin, tech and billing contact * @param string $authcode Authorisation code for domain * * @return bool * * @throws Api_Odr_Exception */ public function transferDomain($domain, $nameservers = array(), $whois = null, $authcode = '') { if (!$this->_checkLogin()) { return false; } $tld = substr(strstr($domain, '.'), 1); $ownerHandle = $this->_obtainHandle($domain, $whois, HANDLE_OWNER); if (!$ownerHandle) { return $ownerHandle; } $adminHandle = $this->_obtainHandle($domain, $whois, HANDLE_ADMIN); if (!$adminHandle) { return $adminHandle; } $techHandle = $this->_obtainHandle($domain, $whois, HANDLE_TECH); if (!$techHandle) { return $techHandle; } $this->_checkPeriod($tld); $parameters = array('contact_registrant' => $ownerHandle, 'contact_tech' => $techHandle, 'contact_onsite' => $adminHandle, 'auth_code' => $authcode); $parameters = array_merge($parameters, $this->convertNameservers($domain, $nameservers)); try { $this->odr->transferDomain($domain, $parameters); } catch (Api_Odr_Exception $e) { $this->Error[] = $e->getMessage(); return false; } return $this->_checkResult(true); }