Ejemplo n.º 1
0
 function parse($data_str, $query)
 {
     $items = ['owner' => 'Contact Type:            registrant', 'admin' => 'Contact Type:            admin', 'tech' => 'Contact Type:            tech', 'billing' => 'Contact Type:            billing', 'domain.name' => 'Domain Name:', 'domain.handle' => 'Domain ID:', 'domain.expires' => 'Expiry Date:', 'domain.created' => 'Created:', 'domain.changed' => 'Last updated:', 'domain.status' => 'Domain Status:', 'domain.sponsor' => 'Sponsoring registrar:', 'domain.nserver.' => 'Host Name:'];
     $translate = ['Contact ID:' => 'handle', 'Name:' => 'name', 'Organisation:' => 'organization', 'Street 1:' => 'address.street.0', 'Street 2:' => 'address.street.1', 'Street 3:' => 'address.street.2', 'City:' => 'address.city', 'State/Province:' => 'address.state', 'Postal code:' => 'address.pcode', 'Country:' => 'address.country', 'Voice:' => 'phone', 'Fax:' => 'fax', 'Email:' => 'email'];
     $blocks = \phpwhois\get_blocks($data_str['rawdata'], $items);
     $r = [];
     if (isset($blocks['domain'])) {
         $r['regrinfo']['domain'] = \phpwhois\format_dates($blocks['domain'], 'dmy');
         $r['regrinfo']['registered'] = 'yes';
         if (isset($blocks['owner'])) {
             $r['regrinfo']['owner'] = \phpwhois\generic_parser_b($blocks['owner'], $translate, 'dmy', false);
             if (isset($blocks['tech'])) {
                 $r['regrinfo']['tech'] = \phpwhois\generic_parser_b($blocks['tech'], $translate, 'dmy', false);
             }
             if (isset($blocks['admin'])) {
                 $r['regrinfo']['admin'] = \phpwhois\generic_parser_b($blocks['admin'], $translate, 'dmy', false);
             }
             if (isset($blocks['billing'])) {
                 $r['regrinfo']['billing'] = \phpwhois\generic_parser_b($blocks['billing'], $translate, 'dmy', false);
             }
         } else {
             $r['regrinfo']['owner'] = \phpwhois\generic_parser_b($data_str['rawdata'], $translate, 'dmy', false);
         }
     } else {
         $r['regrinfo']['registered'] = 'no';
     }
     $r['regyinfo'] = ['referrer' => 'http://www.nic.coop', 'registrar' => '.coop registry'];
     return $r;
 }
Ejemplo n.º 2
0
 function parse($data_str, $query)
 {
     $items = ['domain.name' => 'Domain Name            : ', 'domain.created' => 'Record Created         :', 'domain.changed' => 'Record	Last Updated    :', 'owner.name' => 'Registered for         :', 'admin' => 'Administrative Contact :', 'tech' => 'Technical Contact      :', 'domain.nserver' => 'Domain Name Servers listed in order:', 'registered' => 'No such domain: ', '' => 'The ZA NiC whois'];
     // Arrange contacts ...
     $rawdata = [];
     while (list($key, $line) = each($data_str['rawdata'])) {
         if (strpos($line, ' Contact ') !== false) {
             $pos = strpos($line, ':');
             if ($pos !== false) {
                 $rawdata[] = substr($line, 0, $pos + 1);
                 $rawdata[] = trim(substr($line, $pos + 1));
                 continue;
             }
         }
         $rawdata[] = $line;
     }
     $r['regrinfo'] = \phpwhois\get_blocks($rawdata, $items);
     if (isset($r['regrinfo']['registered'])) {
         $r['regrinfo']['registered'] = 'no';
     } else {
         if (isset($r['regrinfo']['admin'])) {
             $r['regrinfo']['admin'] = get_contact($r['regrinfo']['admin']);
         }
         if (isset($r['regrinfo']['tech'])) {
             $r['regrinfo']['tech'] = get_contact($r['regrinfo']['tech']);
         }
     }
     $r['regyinfo']['referrer'] = 'http://www.za.net/';
     // or http://www.za.org
     $r['regyinfo']['registrar'] = 'ZA NiC';
     \phpwhois\format_dates($r, 'xmdxxy');
     return $r;
 }
Ejemplo n.º 3
0
 function parse($data, $query)
 {
     $items = ['domain.name' => 'Domain:', 'domain.status' => 'Status:', 'domain.nserver' => 'Name servers:', 'domain.created' => 'Registered:', 'domain.registrar' => 'Registrar:', 'tech' => 'Registrar Technical Contacts:', 'owner' => 'Registrant:', '' => 'Please visit'];
     $extra = ['organisation:' => 'organization', 'website:' => 'url'];
     $r['regrinfo'] = \phpwhois\get_blocks($data['rawdata'], $items);
     if (!empty($r['regrinfo']['domain']['status'])) {
         switch ($r['regrinfo']['domain']['status']) {
             case 'FREE':
             case 'AVAILABLE':
                 $r['regrinfo']['registered'] = 'no';
                 break;
             case 'APPLICATION PENDING':
                 $r['regrinfo']['registered'] = 'pending';
                 break;
             default:
                 $r['regrinfo']['registered'] = 'unknown';
         }
     } else {
         $r['regrinfo']['registered'] = 'yes';
     }
     if (isset($r['regrinfo']['tech'])) {
         $r['regrinfo']['tech'] = get_contact($r['regrinfo']['tech'], $extra);
     }
     if (isset($r['regrinfo']['domain']['registrar'])) {
         $r['regrinfo']['domain']['registrar'] = get_contact($r['regrinfo']['domain']['registrar'], $extra);
     }
     $r['regyinfo']['referrer'] = 'http://www.eurid.eu';
     $r['regyinfo']['registrar'] = 'EURID';
     return $r;
 }
Ejemplo n.º 4
0
 function parse($data, $query)
 {
     $items = ['domain.name' => 'Domain name:', 'domain.status' => 'Status:', 'domain.nserver' => 'Domain nameservers:', 'domain.created' => 'Date registered:', 'domain.changed' => 'Record last updated:', 'domain.sponsor' => 'Registrar:', 'admin' => 'Administrative contact:', 'tech' => 'Technical contact(s):'];
     $r['regrinfo'] = \phpwhois\get_blocks($data['rawdata'], $items);
     $r['regyinfo']['referrer'] = 'http://www.domain-registry.nl';
     $r['regyinfo']['registrar'] = 'Stichting Internet Domeinregistratie NL';
     if (!isset($r['regrinfo']['domain']['status'])) {
         $r['regrinfo']['registered'] = 'no';
         return $r;
     }
     if (isset($r['regrinfo']['tech'])) {
         $r['regrinfo']['tech'] = $this->get_contact($r['regrinfo']['tech']);
     }
     if (isset($r['regrinfo']['zone'])) {
         $r['regrinfo']['zone'] = $this->get_contact($r['regrinfo']['zone']);
     }
     if (isset($r['regrinfo']['admin'])) {
         $r['regrinfo']['admin'] = $this->get_contact($r['regrinfo']['admin']);
     }
     if (isset($r['regrinfo']['owner'])) {
         $r['regrinfo']['owner'] = $this->get_contact($r['regrinfo']['owner']);
     }
     $r['regrinfo']['registered'] = 'yes';
     \phpwhois\format_dates($r, 'dmy');
     return $r;
 }
Ejemplo n.º 5
0
 function parse($data_str, $query)
 {
     $items = ['owner' => 'Registrant:', 'admin' => 'Administrative Contact', 'tech' => 'Technical Contact', 'domain.name' => 'Domain Name:', 'domain.nserver.' => 'Domain servers in listed order:', 'domain.created' => 'Created on:', 'domain.expires' => 'Expires on:', 'domain.changed' => 'Last Updated on:', 'domain.sponsor' => 'Registered through:'];
     $r = \phpwhois\get_blocks($data_str, $items);
     $r['owner'] = get_contact($r['owner']);
     $r['admin'] = get_contact($r['admin'], false, true);
     $r['tech'] = get_contact($r['tech'], false, true);
     return \phpwhois\format_dates($r, 'dmy');
 }
Ejemplo n.º 6
0
 function parse($data_str, $query)
 {
     $items = ['owner.name' => 'Registrant Name:', 'owner.organization' => 'Registrant Organization:', 'owner.address.street' => 'Registrant Street:', 'owner.address.city' => 'Registrant City:', 'owner.address.state' => 'Registrant State/Province:', 'owner.address.pcode' => 'Registrant Postal Code:', 'owner.address.country' => 'Registrant Country:', 'owner.phone' => 'Registrant Phone:', 'owner.fax' => 'Registrant Fax:', 'owner.email' => 'Registrant Email:', 'admin.name' => 'Admin Name:', 'admin.organization' => 'Admin Organization:', 'admin.address.street' => 'Admin Street:', 'admin.address.city' => 'Admin City:', 'admin.address.state' => 'Admin State/Province:', 'admin.address.pcode' => 'Admin Postal Code:', 'admin.address.country' => 'Admin Country:', 'admin.phone' => 'Admin Phone:', 'admin.fax' => 'Admin Fax:', 'admin.email' => 'Admin Email:', 'tech.name' => 'Tech Name:', 'tech.organization' => 'Tech Organization:', 'tech.address.street' => 'Tech Street:', 'tech.address.city' => 'Tech City:', 'tech.address.state' => 'Tech State/Province:', 'tech.address.pcode' => 'Tech Postal Code:', 'tech.address.country' => 'Tech Country:', 'tech.phone' => 'Tech Phone:', 'tech.fax' => 'Tech Fax:', 'tech.email' => 'Tech Email:', 'domain.name' => 'Domain Name:', 'domain.sponsor' => 'Reseller:', 'domain.nserver' => 'Name Server:', 'domain.created' => 'Creation Date:', 'domain.expires' => 'Registrar Registration Expiration Date:', 'domain.changed' => 'Updated Date:', 'domain.dnssrc' => 'DNSSRC:'];
     //return easy_parser($data_str, $items, 'dmy', false, false, true);
     $r = \phpwhois\get_blocks($data_str, $items, false, false);
     \phpwhois\format_dates($r, 'dmy');
     $this->_strlower($r);
     return $r;
 }
Ejemplo n.º 7
0
 function parse($data_str, $query)
 {
     $items = ['owner' => 'Holder Contact', 'admin' => 'Admin Contact', 'tech' => 'Tech. Contact', 'domain.nserver.' => 'Nameservers', 'domain.created' => 'Creation Date:', 'domain.expires' => 'Expiration Date:'];
     $translate = ['city:' => 'address.city', 'org. name:' => 'organization', 'address1:' => 'address.street.', 'address2:' => 'address.street.', 'state:' => 'address.state', 'postal code:' => 'address.zip'];
     $r = \phpwhois\get_blocks($data_str, $items, true);
     $r['owner'] = get_contact($r['owner'], $translate);
     $r['admin'] = get_contact($r['admin'], $translate, true);
     $r['tech'] = get_contact($r['tech'], $translate, true);
     return \phpwhois\format_dates($r, 'dmy');
 }
 function parse($data_str, $query)
 {
     $items = ['owner.name' => 'Registrant Name:', 'owner.organization' => 'Registrant Organization:', 'owner.address.street' => 'Registrant Street:', 'owner.address.city' => 'Registrant City:', 'owner.address.state' => 'Registrant State/Province:', 'owner.address.pcode' => 'Registrant Postal Code:', 'owner.address.country' => 'Registrant Country:', 'owner.phone' => 'Registrant Phone:', 'owner.fax' => 'Registrant Fax:', 'owner.email' => 'Registrant Email:', 'admin.name' => 'Admin Name:', 'admin.organization' => 'Admin Organization:', 'admin.address.street' => 'Admin Street:', 'admin.address.city' => 'Admin City:', 'admin.address.state' => 'Admin State/Province:', 'admin.address.pcode' => 'Admin Postal Code:', 'admin.address.country' => 'Admin Country:', 'admin.phone' => 'Admin Phone:', 'admin.fax' => 'Admin Fax:', 'admin.email' => 'Admin Email:', 'tech.name' => 'Tech Name:', 'tech.organization' => 'Tech Organization:', 'tech.address.street' => 'Tech Street:', 'tech.address.city' => 'Tech City:', 'tech.address.state' => 'Tech State/Province:', 'tech.address.pcode' => 'Tech Postal Code:', 'tech.address.country' => 'Tech Country:', 'tech.phone' => 'Tech Phone:', 'tech.fax' => 'Tech Fax:', 'tech.email' => 'Tech Email:', 'domain.name' => 'Domain Name:', 'domain.sponsor' => 'Registrar Name:', 'domain.nserver' => 'Domain servers in listed order:', 'domain.created' => 'Created on..............:', 'domain.expires' => 'Expires on..............:', 'domain.changed' => 'Record last updated on..:'];
     //$r = easy_parser($data_str, $items, 'dmy', false, false, true);
     $r = \phpwhois\get_blocks($data_str, $items, false, false);
     \phpwhois\format_dates($r, 'dmy');
     if (isset($r['domain']['sponsor']) && is_array($r['domain']['sponsor'])) {
         $r['domain']['sponsor'] = $r['domain']['sponsor'][0];
     }
     return $r;
 }
Ejemplo n.º 9
0
 function parse($data_str, $query)
 {
     $items = ['owner' => 'Registrant:', 'domain.name' => 'Domain name:', 'domain.created' => 'Registered:', 'domain.changed' => 'Last modified:', 'domain.nserver' => 'DNS servers:', 'domain.status' => 'Status:', 'tech' => 'Technical contact:', 'admin' => 'Administrative contact:'];
     $r['regrinfo'] = \phpwhois\get_blocks($data_str['rawdata'], $items);
     if (!empty($r['regrinfo']['domain']['name'])) {
         $r['regrinfo'] = \phpwhois\get_contacts($r['regrinfo']);
         $r['regrinfo']['registered'] = 'yes';
     } else {
         $r = '';
         $r['regrinfo']['registered'] = 'no';
     }
     $r['regyinfo'] = ['referrer' => 'http://www.isoc.am', 'registrar' => 'ISOCAM'];
     return $r;
 }
Ejemplo n.º 10
0
 function parse($data, $query)
 {
     $items = ['domain.status' => 'Status:', 'domain.nserver' => 'Domain name servers in listed order:', 'domain.changed' => 'Record last updated on', 'owner' => 'rwhois search on', 'admin' => 'Administrative Contact:', 'tech' => 'Technical Contact:', 'billing' => 'Billing Contact:', '#' => 'Search Again'];
     $r['regrinfo'] = \phpwhois\get_blocks($data['rawdata'], $items);
     if (isset($r['regrinfo']['domain']['status'])) {
         $r['regrinfo']['registered'] = 'yes';
         $r['regrinfo']['domain']['handler'] = strtok(array_shift($r['regrinfo']['owner']), ' ');
         $r['regrinfo'] = \phpwhois\get_contacts($r['regrinfo']);
     } else {
         $r['regrinfo']['registered'] = 'no';
     }
     $r['regyinfo']['referrer'] = 'http://www.org.za';
     $r['regyinfo']['registrar'] = 'The ORG.ZA Domain';
     return $r;
 }
Ejemplo n.º 11
0
 function parse($data_str, $query)
 {
     $items = ['owner' => 'Registrant:', 'admin' => 'Administrative Contact:', 'tech' => 'Technical Contact:', 'domain.name' => 'Domain Name:', 'domain.status' => 'Domain Status:', 'domain.created' => 'Created:', 'domain.changed' => 'Updated:', 'domain.expires' => 'Expired:', 'domain.nserver' => 'Domain servers in listed order:'];
     $extra = ['zip/postal code:' => 'address.pcode'];
     $r['regrinfo'] = \phpwhois\get_blocks($data_str['rawdata'], $items);
     if (!empty($r['regrinfo']['domain']['name'])) {
         $r['regrinfo'] = \phpwhois\get_contacts($r['regrinfo'], $extra);
         $r['regrinfo']['domain']['name'] = $r['regrinfo']['domain']['name'][0];
         $r['regrinfo']['registered'] = 'yes';
     } else {
         $r = '';
         $r['regrinfo']['registered'] = 'no';
     }
     $r['regyinfo'] = ['referrer' => 'http://www.nic.ly', 'registrar' => 'Libya ccTLD'];
     return $r;
 }
Ejemplo n.º 12
0
 function parse($data_str, $query)
 {
     $items = ['owner' => 'Registrant:', 'domain.status' => 'Status:', 'domain.expires' => 'Expires:', 'domain.nserver' => 'Domain servers:'];
     $r['regrinfo'] = \phpwhois\get_blocks($data_str['rawdata'], $items);
     if (!empty($r['regrinfo']['domain']['status'])) {
         $r['regrinfo'] = \phpwhois\get_contacts($r['regrinfo']);
         date_default_timezone_set("Pacific/Fiji");
         if (isset($r['regrinfo']['domain']['expires'])) {
             $r['regrinfo']['domain']['expires'] = strftime("%Y-%m-%d", strtotime($r['regrinfo']['domain']['expires']));
         }
         $r['regrinfo']['registered'] = 'yes';
     } else {
         $r['regrinfo']['registered'] = 'no';
     }
     $r['regyinfo'] = ['referrer' => 'http://www.domains.fj', 'registrar' => 'FJ Domain Name Registry'];
     return $r;
 }
Ejemplo n.º 13
0
 function parse($data_str, $query)
 {
     $items = ['owner' => 'Titular:', 'domain.name' => 'Nombre de Dominio:', 'admin' => 'Contacto Administrativo', 'tech' => 'Contacto Tecnico', 'billing' => 'Contacto de Cobranza:', 'domain.created' => 'Fecha de Creacion:', 'domain.changed' => 'Ultima Actualizacion:', 'domain.expires' => 'Fecha de Vencimiento:', 'domain.status' => 'Estatus del dominio:', 'domain.nserver' => 'Servidor(es) de Nombres de Dominio'];
     $r['regrinfo'] = \phpwhois\get_blocks($data_str['rawdata'], $items);
     if (!isset($r['regrinfo']['domain']['created']) || is_array($r['regrinfo']['domain']['created'])) {
         $r['regrinfo'] = ['registered' => 'no'];
         return $r;
     }
     $dns = [];
     foreach ($r['regrinfo']['domain']['nserver'] as $nserv) {
         if ($nserv[0] == '-') {
             $dns[] = $nserv;
         }
     }
     $r['regrinfo']['domain']['nserver'] = $dns;
     $r['regrinfo'] = \phpwhois\get_contacts($r['regrinfo']);
     $r['regyinfo'] = ['referrer' => 'http://registro.nic.ve', 'registrar' => 'NIC-Venezuela - CNTI'];
     return $r;
 }
Ejemplo n.º 14
0
 function parse($data, $query)
 {
     $items = ['domain.name' => ' / Domain Name:', 'domain.created' => 'Data de registo / Creation Date (dd/mm/yyyy):', 'domain.nserver.' => 'Nameserver:', 'domain.status' => 'Estado / Status:', 'owner' => 'Titular / Registrant', 'billing' => 'Entidade Gestora / Billing Contact', 'admin' => 'Respons�vel Administrativo / Admin Contact', 'tech' => 'Respons�vel T�cnico / Tech Contact', '#' => 'Nameserver Information'];
     $r['regrinfo'] = \phpwhois\get_blocks($data['rawdata'], $items);
     if (empty($r['regrinfo']['domain']['name'])) {
         print_r($r['regrinfo']);
         $r['regrinfo']['registered'] = 'no';
         return $r;
     }
     $r['regrinfo']['domain']['created'] = get_date($r['regrinfo']['domain']['created'], 'dmy');
     if ($r['regrinfo']['domain']['status'] == 'ACTIVE') {
         $r['regrinfo'] = \phpwhois\get_contacts($r['regrinfo']);
         $r['regrinfo']['registered'] = 'yes';
     } else {
         $r['regrinfo']['registered'] = 'no';
     }
     $r['regyinfo'] = ['referrer' => 'http://www.fccn.pt', 'registrar' => 'FCCN'];
     return $r;
 }
Ejemplo n.º 15
0
 function parse($data_str, $query)
 {
     $blocks = ['owner1' => '[ Organization Information ]', 'tech1' => '[ Technical Contact Information ]', 'owner2' => '[ ISP Organization Information ]', 'admin2' => '[ ISP IP Admin Contact Information ]', 'tech2' => '[ ISP IP Tech Contact Information ]', 'admin3' => '[ ISP IPv4 Admin Contact Information ]', 'tech3' => '[ ISP IPv4 Tech Contact Information ]', 'abuse' => '[ ISP Network Abuse Contact Information ]', 'network.inetnum' => 'IPv4 Address       :', 'network.name' => 'Network Name       :', 'network.mnt-by' => 'Connect ISP Name   :', 'network.created' => 'Registration Date  :'];
     $items = ['Orgnization ID     :' => 'handle', 'Org Name      :' => 'organization', 'Org Name           :' => 'organization', 'Name          :' => 'name', 'Name               :' => 'name', 'Org Address   :' => 'address.street', 'Zip Code      :' => 'address.pcode', 'State         :' => 'address.state', 'Address            :' => 'address.street', 'Zip Code           :' => 'address.pcode', 'Phone         :' => 'phone', 'Phone              :' => 'phone', 'Fax           :' => 'fax', 'E-Mail        :' => 'email', 'E-Mail             :' => 'email'];
     $b = \phpwhois\get_blocks($data_str, $blocks);
     if (isset($b['network'])) {
         $r['network'] = $b['network'];
     }
     if (isset($b['owner1'])) {
         $r['owner'] = \phpwhois\generic_parser_b($b['owner1'], $items, 'Ymd', false);
     } else {
         if (isset($b['owner2'])) {
             $r['owner'] = \phpwhois\generic_parser_b($b['owner2'], $items, 'Ymd', false);
         }
     }
     if (isset($b['admin2'])) {
         $r['admin'] = \phpwhois\generic_parser_b($b['admin2'], $items, 'Ymd', false);
     } else {
         if (isset($b['admin3'])) {
             $r['admin'] = \phpwhois\generic_parser_b($b['admin3'], $items, 'Ymd', false);
         }
     }
     if (isset($b['tech1'])) {
         $r['tech'] = \phpwhois\generic_parser_b($b['tech1'], $items, 'Ymd', false);
     } else {
         if (isset($b['tech2'])) {
             $r['tech'] = \phpwhois\generic_parser_b($b['tech2'], $items, 'Ymd', false);
         } else {
             if (isset($b['tech3'])) {
                 $r['tech'] = \phpwhois\generic_parser_b($b['tech3'], $items, 'Ymd', false);
             }
         }
     }
     if (isset($b['abuse'])) {
         $r['abuse'] = \phpwhois\generic_parser_b($b['abuse'], $items, 'Ymd', false);
     }
     $r = \phpwhois\format_dates($r, 'Ymd');
     $r = ['regrinfo' => $r];
     $r['regyinfo']['type'] = 'ip';
     $r['regyinfo']['registrar'] = 'Korean Network Information Centre';
     return $r;
 }
Ejemplo n.º 16
0
 function parse($data, $query)
 {
     $items = ['owner' => 'Registrant', 'admin' => 'Admin', 'tech' => 'Technical', 'billing' => 'Billing', 'domain.nserver' => 'Name Servers:', 'domain.created' => 'Created:', 'domain.expires' => 'Expires:', 'domain.changed' => 'Modified:', 'domain.status' => 'Status:', 'domain.sponsor' => 'Registrar Name:'];
     $r['regrinfo'] = \phpwhois\get_blocks($data['rawdata'], $items);
     $items = ['phone number:' => 'phone', 'email address:' => 'email', 'fax number:' => 'fax', 'organisation:' => 'organization'];
     if (!empty($r['regrinfo']['domain']['created'])) {
         $r['regrinfo'] = \phpwhois\get_contacts($r['regrinfo'], $items);
         if (count($r['regrinfo']['billing']['address']) > 4) {
             $r['regrinfo']['billing']['address'] = array_slice($r['regrinfo']['billing']['address'], 0, 4);
         }
         $r['regrinfo']['registered'] = 'yes';
         \phpwhois\format_dates($r['regrinfo']['domain'], 'dmY');
     } else {
         $r = '';
         $r['regrinfo']['registered'] = 'no';
     }
     $r['regyinfo']['referrer'] = 'http://www.dot.dm';
     $r['regyinfo']['registrar'] = 'dotFM';
     return $r;
 }
Ejemplo n.º 17
0
 function parse($data_str, $query)
 {
     $items = ['owner.organization' => 'Registrant:', 'owner.address' => "Registrant's address:", 'owner.type' => 'Registrant type:', 'domain.created' => 'Registered on:', 'domain.changed' => 'Last updated:', 'domain.expires' => 'Renewal date:', 'domain.nserver' => 'Name servers:', 'domain.sponsor' => 'Registrar:', 'domain.status' => 'Registration status:', 'domain.dnssec' => 'DNSSEC:', '' => 'WHOIS lookup made at', 'disclaimer' => '--'];
     $r['regrinfo'] = \phpwhois\get_blocks($data_str['rawdata'], $items);
     if (isset($r['regrinfo']['owner'])) {
         $r['regrinfo']['owner']['organization'] = $r['regrinfo']['owner']['organization'][0];
         $r['regrinfo']['domain']['sponsor'] = $r['regrinfo']['domain']['sponsor'][0];
         $r['regrinfo']['registered'] = 'yes';
         $r = \phpwhois\format_dates($r, 'dmy');
     } else {
         if (strpos($data_str['rawdata'][1], 'Error for ')) {
             $r['regrinfo']['registered'] = 'yes';
             $r['regrinfo']['domain']['status'] = 'invalid';
         } else {
             $r['regrinfo']['registered'] = 'no';
         }
     }
     $r['regyinfo'] = ['referrer' => 'http://www.nominet.org.uk', 'registrar' => 'Nominet UK'];
     return $r;
 }
Ejemplo n.º 18
0
 function parse($data, $query)
 {
     $items = ['domain.name' => 'Domain:', 'domain.status' => 'Status:', 'domain.nserver' => 'Nameservers:', 'domain.created' => 'Registered:', 'owner' => 'Licensee:', 'admin' => 'Onsite Contacts:', 'tech' => 'Registrar Technical Contacts:', 'agent' => 'Registrar:', 'agent.uri' => 'Website:'];
     $trans = ['company name2:' => ''];
     $r['regrinfo'] = \phpwhois\get_blocks($data['rawdata'], $items);
     if ($r['regrinfo']['domain']['status'] == 'REGISTERED') {
         $r['regrinfo']['registered'] = 'yes';
         $r['regrinfo'] = \phpwhois\get_contacts($r['regrinfo'], $trans);
         if (isset($r['regrinfo']['agent'])) {
             $sponsor = get_contact($r['regrinfo']['agent'], $trans);
             unset($r['regrinfo']['agent']);
             $r['regrinfo']['domain']['sponsor'] = $sponsor;
         }
         $r = \phpwhois\format_dates($r, '-mdy');
     } else {
         $r['regrinfo']['registered'] = 'no';
     }
     $r['regyinfo']['referrer'] = 'http://www.domain-registry.nl';
     $r['regyinfo']['registrar'] = 'DNS Belgium';
     return $r;
 }
Ejemplo n.º 19
0
 function parse($data_str, $query)
 {
     $items = ['owner' => 'Holder of domain name:', 'domain.name' => 'Domain name:', 'domain.created' => 'Date of last registration:', 'domain.changed' => 'Date of last modification:', 'tech' => 'Technical contact:', 'domain.nserver' => 'Name servers:', 'domain.dnssec' => 'DNSSEC:'];
     $trans = ['contractual language:' => 'language'];
     $r['regrinfo'] = \phpwhois\get_blocks($data_str['rawdata'], $items);
     if (!empty($r['regrinfo']['domain']['name'])) {
         $r['regrinfo'] = \phpwhois\get_contacts($r['regrinfo'], $trans);
         $r['regrinfo']['domain']['name'] = $r['regrinfo']['domain']['name'][0];
         if (isset($r['regrinfo']['domain']['changed'][0])) {
             $r['regrinfo']['domain']['changed'] = get_date($r['regrinfo']['domain']['changed'][0], 'dmy');
         }
         if (isset($r['regrinfo']['domain']['created'][0])) {
             $r['regrinfo']['domain']['created'] = get_date($r['regrinfo']['domain']['created'][0], 'dmy');
         }
         $r['regrinfo']['registered'] = 'yes';
     } else {
         $r = '';
         $r['regrinfo']['registered'] = 'no';
     }
     $r['regyinfo'] = ['referrer' => 'http://www.nic.ch', 'registrar' => 'SWITCH Domain Name Registration'];
     return $r;
 }