2005-07-25 17:59:55 +00:00
|
|
|
<?php
|
|
|
|
/*
|
2005-07-27 09:57:53 +00:00
|
|
|
Whois.php PHP classes to conduct whois queries
|
|
|
|
|
|
|
|
Copyright (C)1999,2005 easyDNS Technologies Inc. & Mark Jeftovic
|
|
|
|
|
2011-07-08 18:16:52 +00:00
|
|
|
Maintained by David Saez
|
2005-07-27 09:57:53 +00:00
|
|
|
|
|
|
|
For the most recent version of this package visit:
|
|
|
|
|
2005-08-31 15:26:22 +00:00
|
|
|
http://www.phpwhois.org
|
2005-07-27 09:57:53 +00:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
2005-08-26 06:46:49 +00:00
|
|
|
*/
|
2005-07-25 17:59:55 +00:00
|
|
|
|
2005-12-11 08:39:05 +00:00
|
|
|
if (!defined('__DE_HANDLER__'))
|
|
|
|
define('__DE_HANDLER__', 1);
|
2005-07-25 17:59:55 +00:00
|
|
|
|
2005-07-26 19:00:06 +00:00
|
|
|
require_once('whois.parser.php');
|
2005-07-25 17:59:55 +00:00
|
|
|
|
2005-08-26 06:46:49 +00:00
|
|
|
class de_handler
|
|
|
|
{
|
|
|
|
function parse($data_str, $query)
|
|
|
|
{
|
2018-05-03 08:04:28 +00:00
|
|
|
$items = [
|
|
|
|
'domain.name' => 'Domain:',
|
|
|
|
'domain.nserver.' => 'Nserver:',
|
|
|
|
'domain.nserver.#' => 'Nsentry:',
|
|
|
|
'domain.status' => 'Status:',
|
|
|
|
'domain.changed' => 'Changed:',
|
2006-05-13 18:56:36 +00:00
|
|
|
'domain.desc.' => 'Descr:',
|
2018-05-03 08:04:28 +00:00
|
|
|
'owner' => '[Holder]',
|
|
|
|
'admin' => '[Admin-C]',
|
|
|
|
'tech' => '[Tech-C]',
|
|
|
|
'zone' => '[Zone-C]'
|
|
|
|
];
|
2005-08-26 06:46:49 +00:00
|
|
|
|
2018-05-03 08:04:28 +00:00
|
|
|
$extra = [
|
2006-05-13 18:56:36 +00:00
|
|
|
'city:' => 'address.city',
|
2011-06-26 10:01:21 +00:00
|
|
|
'postalcode:' => 'address.pcode',
|
|
|
|
'countrycode:' => 'address.country',
|
2007-04-27 17:07:47 +00:00
|
|
|
'remarks:' => '',
|
2010-07-28 08:35:55 +00:00
|
|
|
'sip:' => 'sip',
|
2018-05-03 08:04:28 +00:00
|
|
|
'type:' => '',
|
|
|
|
'address:' => 'address.street.'
|
|
|
|
];
|
2005-08-26 06:46:49 +00:00
|
|
|
|
2018-05-03 08:04:28 +00:00
|
|
|
$r['regrinfo'] = easy_parser($data_str['rawdata'], $items, 'ymd', $extra);
|
2005-08-26 06:46:49 +00:00
|
|
|
|
2018-05-03 08:04:28 +00:00
|
|
|
$r['regyinfo'] = [
|
2005-12-11 08:39:05 +00:00
|
|
|
'registrar' => 'DENIC eG',
|
|
|
|
'referrer' => 'http://www.denic.de/'
|
2018-05-03 08:04:28 +00:00
|
|
|
];
|
2005-08-26 06:46:49 +00:00
|
|
|
|
2018-05-03 08:04:28 +00:00
|
|
|
if (!isset($r['regrinfo']['domain']['status']) || $r['regrinfo']['domain']['status'] == 'free')
|
|
|
|
{
|
|
|
|
$r['regrinfo']['registered'] = 'no';
|
|
|
|
}
|
|
|
|
else
|
2009-09-02 11:21:42 +00:00
|
|
|
{
|
2005-12-11 08:39:05 +00:00
|
|
|
$r['regrinfo']['domain']['changed'] = substr($r['regrinfo']['domain']['changed'], 0, 10);
|
2009-09-02 11:21:42 +00:00
|
|
|
$r['regrinfo']['registered'] = 'yes';
|
|
|
|
}
|
2018-05-03 08:04:28 +00:00
|
|
|
|
2009-09-02 11:21:42 +00:00
|
|
|
return $r;
|
2005-08-26 06:46:49 +00:00
|
|
|
}
|
2005-07-25 17:59:55 +00:00
|
|
|
}
|