/** * Get information available of the requested contact * * @param string $handle The handle of the contact to request * * @return Whois|bool Information available about the requested contact */ public function getContact($handle) { if (!$handle || !$this->_checkLogin()) { return false; } $whois = new Whois(); try { $this->odr->getContact($handle); } catch (Api_Odr_Exception $e) { $this->Error[] = $e->getMessage(); return false; } $result = $this->odr->getResult(); if ($result['status'] !== Api_Odr::STATUS_SUCCESS) { return $this->parseError($result['response']); } $response = $result['response']; $whois->ownerCompanyName = $response['full_name']; $whois->ownerTaxNumber = empty($response['company_vatin']) ? null : $response['company_vatin']; $whois->ownerCompanyLegalForm = $response['organization_legal_form']; $whois->ownerSex = $response['gender'] === 'FEMALE' ? 'f' : 'm'; $whois->ownerInitials = $response['initials']; $whois->ownerSurName = $response['last_name']; $whois->ownerAddress = $response['street'] . ' ' . $response['house_number']; $whois->ownerZipCode = $response['postal_code']; $whois->ownerCity = $response['city']; $whois->ownerCountry = $response['country']; $whois->ownerState = $response['state']; $whois->ownerRegion = $response['state']; $whois->ownerPhoneNumber = $response['phone']; $whois->ownerFaxNumber = $response['fax']; $whois->ownerEmailAddress = $response['email']; $whois->ownercustom = array('state' => $response['state'], 'region' => $response['state']); $whois->ownercustomvalues = array('state' => $response['state'], 'region' => $response['state']); return $whois; }