From 267d234b2ba58047433b5bef3d4ea22c6d5d7e25 Mon Sep 17 00:00:00 2001 From: sparc Date: Thu, 29 Mar 2012 11:19:52 +0000 Subject: [PATCH] added gtld hanlder for nameintel --- src/whois.gtld.nameintel.php | 64 ++++++++++++++++++++++++++++++++++++ test.txt | 1 + 2 files changed, 65 insertions(+) create mode 100644 src/whois.gtld.nameintel.php diff --git a/src/whois.gtld.nameintel.php b/src/whois.gtld.nameintel.php new file mode 100644 index 0000000..d103715 --- /dev/null +++ b/src/whois.gtld.nameintel.php @@ -0,0 +1,64 @@ + 'Registrant Contact:', + 'admin' => 'Administrative Contact:', + 'tech' => 'Technical Contact', + 'domain.name' => 'Domain Name:', + 'domain.status' => 'Status:', + 'domain.nserver' => 'Name Server:', + 'domain.created' => 'Creation Date:', + 'domain.expires' => 'Expiration Date:' + ); + + $r = easy_parser($data_str, $items, 'dmy', false, false, true); + + if (isset($r['domain']['sponsor']) && is_array($r['domain']['sponsor'])) + $r['domain']['sponsor'] = $r['domain']['sponsor'][0]; + + foreach($r as $key => $part) + { + if (isset($part['address'])) + { + $r[$key]['organization'] = array_shift($r[$key]['address']); + $r[$key]['address']['country'] = array_pop($r[$key]['address']); + } + } + return $r; + } + } +?> diff --git a/test.txt b/test.txt index c52b0bf..fee97c7 100644 --- a/test.txt +++ b/test.txt @@ -71,6 +71,7 @@ markmonitor markmonitor.com melbourneit inww.com moniker moniker.com name name.com +nameintel domaintools.com namejuice namejuice.com nameking nameking.com names4ever names4ever.com