From 5648f80490f5ac6dfa8812d97afbafe272d8507f Mon Sep 17 00:00:00 2001 From: sparc Date: Wed, 11 Jun 2008 15:32:34 +0000 Subject: [PATCH] added .ro handler --- Changes.md | 1 + src/whois.ro.php | 101 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 src/whois.ro.php diff --git a/Changes.md b/Changes.md index 8e44842..f28c084 100644 --- a/Changes.md +++ b/Changes.md @@ -1,6 +1,7 @@ 2008/06/11 - fixed .cz handler registered date - fixed .fr handler + - added .ro handler 2008/05/28 - added handler for .it diff --git a/src/whois.ro.php b/src/whois.ro.php new file mode 100644 index 0000000..006fa62 --- /dev/null +++ b/src/whois.ro.php @@ -0,0 +1,101 @@ + 'fax', + 'e-mail' => 'email', + 'nic-hdl' => 'handle', + 'person' => 'name', + 'address' => 'address.', + 'domain-name' => '', + 'updated' => 'changed', + 'registration-date' => 'created', + 'domain-status' => 'status', + 'nameserver' => 'nserver' + ); + + $contacts = array( + 'admin-contact' => 'admin', + 'technical-contact' => 'tech', + 'zone-contact' => 'zone', + 'billing-contact' => 'billing' + ); + + $extra = array( + 'postal code:' => 'address.pcode' + ); + + $reg = generic_parser_a($data_str['rawdata'], $translate, $contacts, 'domain','Ymd'); + + if (isset($reg['domain']['description'])) + { + $reg['owner'] = get_contact($reg['domain']['description'],$extra); + unset($reg['domain']['description']); + + foreach($reg as $key => $item) + { + if (isset($item['address'])) + { + $data = $item['address']; + unset($reg[$key]['address']); + $reg[$key] = array_merge($reg[$key],get_contact($data,$extra)); + } + } + + $reg['registered'] = 'yes'; + } + else + $reg['registered'] = 'no'; + + $r['regrinfo'] = $reg; + $r['regyinfo'] = array( + 'referrer' => 'http://www.nic.ro', + 'registrar' => 'nic.ro' + ); + + return ($r); + } + } +?>