phpWhois.org/whois.gtld.bulkr.php

104 lines
3 KiB
PHP
Raw Normal View History

<?php
2003-01-19 04:43:39 +00:00
/*
2005-07-27 09:57:53 +00:00
Whois.php PHP classes to conduct whois queries
2005-07-27 09:57:53 +00:00
Copyright (C)1999,2005 easyDNS Technologies Inc. & Mark Jeftovic
2005-07-27 09:57:53 +00:00
Maintained by David Saez (david@ols.es)
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
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
*/
2002-10-08 16:49:26 +00:00
2003-01-19 04:43:39 +00:00
/* bulkregistercom.whois 1.0 mark jeftovic 1999/12/06 */
/* bulkregistercom.whois 1.1 Matthijs Koot 2003/01/14 */
2005-08-31 17:03:18 +00:00
/* bulkregistercom.whois 1.2 David Saez 2005/08/31 */
2002-10-08 16:49:26 +00:00
2005-11-14 10:13:24 +00:00
if (!defined('__BULKR_HANDLER__'))
define('__BULKR_HANDLER__', 1);
2002-10-08 16:49:26 +00:00
/*#################################################
2005-08-26 06:46:49 +00:00
Matthijs Koot - 2003/01/14 - matthijs[AT]koot[DOT]biz - http://www.koot.biz
--> BulkRegister V1.1 UPDATE NOTE:
2005-08-26 06:46:49 +00:00
BulkRegister.com has several antispam measures, which include
grammatic algorithms for changing their Whois output every
x request or every x seconds or so. This update includes
new regexp's to extract the information.
2005-08-26 06:46:49 +00:00
In addition, whois.bulkregister.com will only allow few
whois request to be made from the same IP-address within
a specific period of time. Exceeding requests will be
bounced!
2005-08-26 06:46:49 +00:00
I have tested it on dozens of domains, but as I'm a
regexp newbie it *might* be buggy - bugreports are welcome!
2005-08-26 06:46:49 +00:00
#################################################*/
2005-08-26 06:46:49 +00:00
require_once('whois.parser.php');
2005-08-26 06:46:49 +00:00
class bulkr_handler
{
function parse($data_str, $query)
{
2005-08-31 17:03:18 +00:00
$items = array(
2005-11-14 10:13:24 +00:00
'admin' => 'Administrative Contact',
'tech' => 'Technical Contact',
'billing' => 'Billing Contact',
'domain.name' => 'Domain name:',
'domain.nserver.' => 'Domain servers in listed order:',
'dummy' => 'Record update'
2005-08-31 17:03:18 +00:00
);
$r = get_blocks($data_str, $items);
2005-11-14 10:13:24 +00:00
if (isset($r['admin']))
$r['admin'] = get_contact($r['admin']);
if (isset($r['admin']))
$r['tech'] = get_contact($r['tech']);
if (isset($r['billing']))
$r['billing'] = get_contact($r['billing']);
2005-08-31 17:03:18 +00:00
unset($r['dummy']);
reset($data_str);
while (list($key, $val) = each($data_str))
if (trim($val)=='') break;
while (list($key, $val) = each($data_str))
if (trim($val)!='') break;
$r['owner']['name'] = $val;
while (list($key, $val) = each($data_str))
{
if (trim($val)=='') break;
$r['owner']['address'][] = $val;
2005-08-26 06:46:49 +00:00
}
2005-08-31 17:03:18 +00:00
2005-08-26 06:46:49 +00:00
format_dates($r, 'ymd');
return ($r);
}
}
2004-04-23 08:47:20 +00:00
?>