html & cosmetic changes in examples
This commit is contained in:
parent
745df4c8ef
commit
177eefbbef
5 changed files with 53 additions and 114 deletions
|
@ -1,4 +1,7 @@
|
|||
2011/08/07
|
||||
2011/07/09
|
||||
- html & cosmetic changes in examples
|
||||
|
||||
2011/07/08
|
||||
- fixes for arin (bug #3339783)
|
||||
- fixed .nl handler (bug #3314404)
|
||||
- fixed .ae whois server (bug #3354286)
|
||||
|
|
66
example.html
66
example.html
|
@ -1,43 +1,49 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>whois.php -base classes to do whois queries with php</title>
|
||||
</head><body bgcolor="white">
|
||||
|
||||
<!--results-->
|
||||
<blockquote>
|
||||
<b>Results for {query} :</b><br></br>
|
||||
{result}
|
||||
</blockquote>
|
||||
<!--/results-->
|
||||
<style type="text/css">
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<center>
|
||||
|
||||
<h1>phpWhois {ver} - base class to do whois queries with php</h1>
|
||||
|
||||
<p>
|
||||
© 1999 - 2011 <a href="http://www.easydns.com/">easyDNS
|
||||
Technologies Inc.</a> & <a href="http://mark.jeftovic.net/">Mark Jeftovic</a><br/>
|
||||
Now maintained and hosted by David Saez at <a href="http://www.ols.es">OLS 20000</a><br/>
|
||||
Placed under the GPL. See the LICENSE file in the distribution.
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<tr><td bgcolor="#55aaff">
|
||||
<form method="get" action="{self}">
|
||||
|
||||
<table>
|
||||
<tr><td colspan=2>
|
||||
<center>
|
||||
<tr><td colspan="3" align="center">
|
||||
<b>Enter any domain name, ip address or AS handle you would like to query whois for</b>
|
||||
<br></br><br></br>
|
||||
<input name="query"></input> <input type="submit" value="Whois"></input>
|
||||
</center>
|
||||
<br/><br/>
|
||||
<input name="query" /> <input type="submit" value="Whois" /><br/>
|
||||
</td></tr>
|
||||
|
||||
<tr><td>
|
||||
<input type="radio" name="output" value="normal"></input> Show me regular output
|
||||
<br></br>
|
||||
<input type="radio" name="output" value="nice" checked></input> Show me HTMLized output
|
||||
<br></br>
|
||||
<input type="radio" name="output" value="object"></input> Show me the returned PHP object
|
||||
<tr>
|
||||
<td>
|
||||
<input type="radio" name="output" value="normal" /> Show me regular output<br/>
|
||||
<input type="radio" name="output" value="nice" checked="checked" /> Show me HTMLized output<br/>
|
||||
<input type="radio" name="output" value="object" /> Show me the returned PHP object
|
||||
</td>
|
||||
|
||||
<td align=right valign=bottom>
|
||||
<a href="http://www.phpwhois.org">
|
||||
<img border=0 src="whois.icon.png" alt=""></img><br></br>
|
||||
</a>
|
||||
<td align="left" valign="top">
|
||||
<input type="checkbox" name="fast" value="1" /> Fast lookup
|
||||
</td>
|
||||
|
||||
<td align="right" valign="bottom">
|
||||
<a href="http://www.phpwhois.org" title="phpWhois web page">
|
||||
<img border="0" src="whois.icon.png" alt="phpWhois web page" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
@ -46,5 +52,13 @@
|
|||
</td></tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<!--results-->
|
||||
<p><b>Results for {query} :</b></p>
|
||||
<blockquote>
|
||||
{result}
|
||||
</blockquote>
|
||||
<!--/results-->
|
||||
|
||||
</body>
|
||||
</html>
|
13
example.php
13
example.php
|
@ -50,15 +50,15 @@ if (isSet($_GET['query']))
|
|||
// Set to true if you want to allow proxy requests
|
||||
$allowproxy = false;
|
||||
|
||||
// uncomment the following line to get faster but less acurate results
|
||||
// $whois->deep_whois = false;
|
||||
// get faster but less acurate results
|
||||
$whois->deep_whois = empty($_GET['fast']);
|
||||
|
||||
// To use special whois servers (see README)
|
||||
//$whois->UseServer('uk','whois.nic.uk:1043?{hname} {ip} {query}');
|
||||
//$whois->UseServer('au','whois-check.ausregistry.net.au');
|
||||
|
||||
// uncomment the following line to add support for non ICANN tld's
|
||||
// $whois->non_icann = true;
|
||||
// Comment the following line to disable support for non ICANN tld's
|
||||
$whois->non_icann = true;
|
||||
|
||||
$result = $whois->Lookup($query);
|
||||
$resout = str_replace('{query}', $query, $resout);
|
||||
|
@ -108,14 +108,13 @@ if (isSet($_GET['query']))
|
|||
}
|
||||
}
|
||||
|
||||
//$winfo = utf8_encode($winfo);
|
||||
|
||||
$resout = str_replace('{result}', $winfo, $resout);
|
||||
}
|
||||
else
|
||||
$resout = '';
|
||||
|
||||
echo str_replace('{results}', $resout, $out);
|
||||
$out = str_replace('{ver}',$whois->CODE_VERSION,$out);
|
||||
exit(str_replace('{results}', $resout, $out));
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ class Whois extends WhoisClient
|
|||
var $non_icann = false;
|
||||
|
||||
// Network Solutions registry server
|
||||
var $NSI_REGISTRY = "whois.nsiregistry.net";
|
||||
var $NSI_REGISTRY = 'whois.nsiregistry.net';
|
||||
|
||||
/*
|
||||
* Constructor function
|
||||
|
|
|
@ -26,83 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
*/
|
||||
|
||||
class utils extends Whois {
|
||||
/*
|
||||
Not updated anymore
|
||||
var $REGISTRARS = array(
|
||||
'ac' => 'http://www.nic.ac/cgi-bin/whois',
|
||||
'ad' => 'http://www.nic.ad/',
|
||||
'ar' => 'http://www.nic.ar/consultas/consdom.htm',
|
||||
'as' => 'http://www.nic.as/ASWhois.html',
|
||||
'at' => 'http://whois.aco.net/',
|
||||
'au' => 'http://www.aunic.net/namestatus.html',
|
||||
'be' => 'http://www.DNS.BE/domain-info/info.html',
|
||||
'br' => 'http://registro.fapesp.br/cgi-bin/nicbr/domainsearch',
|
||||
'ca' => 'http://www.cdnnet.ca/',
|
||||
'ch' => 'http://www.switch.ch/domain/search_form.html',
|
||||
'ci' => 'http://whois.nic.ci',
|
||||
'cl' => 'http://sunsite.dcc.uchile.cl/cgi-bin/dom-CL',
|
||||
'cr' => 'http://www.nic.cr/consulta-dns.html',
|
||||
'cx' => 'http://whois.nic.cx/',
|
||||
'cz' => 'gopher://gopher.eunet.cz:70/00/cz-info/cz.list',
|
||||
'de' => 'http://www.nic.de/servlet/Whois',
|
||||
'dk' => 'http://www.dk.net/nic/resIPno.html',
|
||||
'es' => 'http://www.nic.es/whois/',
|
||||
'fi' => 'http://www.thk.fi/englanti/internet/n2579.htm',
|
||||
'fm' => 'http://www.dot.fm/search.html',
|
||||
'fr' => 'http://www.nic.fr/info/whois.html',
|
||||
'ge' => 'http://georgia.net.ge/domain/',
|
||||
'gi' => 'http://www.gibnet.gi/nic/domains.html',
|
||||
'gr' => 'http://pythia.ics.forth.gr/cgi-bin/webwhois',
|
||||
'hm' => 'http://www.nic.hm/whois.html',
|
||||
'hr' => 'http://ds.carnet.hr/whois/diggere.html',
|
||||
'ie' => 'http://www.ucd.ie/hostmaster/dom-list.html',
|
||||
'im' => 'http://www.nic.im/exist.html',
|
||||
'io' => 'http://www.io.io/whois.html',
|
||||
'is' => 'http://www.isnet.is/en/sites.html',
|
||||
'it' => 'http://www.nis.garr.it/cgi-bin/HY/rc?/who/conf',
|
||||
'jp' => 'http://www.nic.ad.jp/cgi-bin/whois_gate',
|
||||
'kr' => 'http://www.krnic.net/cgi-bin/whois',
|
||||
'kz' => 'http://www.domain.kz/search',
|
||||
'li' => 'http://www.switch.ch/domain/search_form.html',
|
||||
'lk' => 'http://www.nic.lk/cgi-bin/whois',
|
||||
'lt' => 'http://vingis.sc-uni.ktu.lt/cgi-bin/whoisnoc?',
|
||||
'lu' => 'http://www.domain-registration.lu/whois.html',
|
||||
'mm' => 'http://www.nic.mm/whois.html',
|
||||
'mt' => 'http://www.um.edu.mt/nic/dir/',
|
||||
'mx' => 'http://www.nic.mx:81/cgi/db/dom',
|
||||
'nl' => 'http://www.domain-registry.nl/NLwhois.html',
|
||||
'nu' => 'http://www.nunames.nu',
|
||||
'nz' => 'http://servius.waikato.ac.nz/isocnz/nz-domain/DNSquery.html',
|
||||
'pa' => 'http://www.nic.pa/indice2.html',
|
||||
'pe' => 'http://ekeko.rcp.net.pe/rcp/PE-NIC/busqueda.html',
|
||||
'pk' => 'http://www.pknic.net.pk/pknic/assigned.htm',
|
||||
'pt' => 'http://www.fccn.pt/dns/pt.html',
|
||||
'ru' => 'http://www.ripn.net/nic/NICHomePage.html',
|
||||
'se' => 'http://www.sunet.se/domreg/',
|
||||
'sg' => 'http://www.nic.net.sg/sgnametk.htm',
|
||||
'sk' => 'http://www.eunet.sk/sk-nic/',
|
||||
'st' => 'http://www.nic.sh/cgi-bin/whois',
|
||||
'th' => 'http://www.thnic.net/whois.html',
|
||||
'tm' => 'http://www.nic.tm/cgi-bin/search',
|
||||
'to' => 'http://www.tonic.to/newname.htm',
|
||||
'tw' => 'http://www.twnic.net/ipdomain.html',
|
||||
'uk' => 'http://www.pipex.net/~guyd/rwhois.html',
|
||||
'us' => 'http://www.isi.edu:80/in-notes/usdnr/rwhois.html',
|
||||
've' => 'http://www.nic.ve/nicwho01.html',
|
||||
'yu' => 'http://ubbg.etf.bg.ac.yu/yu-tld/domains.html',
|
||||
'za' => 'http://co.za/whois.shtml'
|
||||
);
|
||||
|
||||
function getRegistrar($cc) {
|
||||
$cc = trim(strtolower($cc));
|
||||
$temp = $this->REGISTRARS;
|
||||
if ($temp[$cc]) {
|
||||
return $temp[$cc];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// showObject() and debugObject()
|
||||
// - debug code to show an object or array
|
||||
|
@ -110,7 +33,7 @@ class utils extends Whois {
|
|||
function showObject(&$obj)
|
||||
{
|
||||
$r = $this->debugObject($obj);
|
||||
return "<PRE>$r</PRE>\n";
|
||||
return "<pre>$r</pre>\n";
|
||||
}
|
||||
|
||||
function debugObject($obj,$indent=0)
|
||||
|
|
Loading…
Reference in a new issue