PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Kemal GENIS   PHP Whois Lookup Class   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Whois Lookup Class
Get details about a registered domain using whois
Author: By
Last change: added reconnect whois server
set charset
Date: 5 years ago
Size: 342 bytes
 

Contents

Class file image Download
<?php
header
('Content-Type: text/html; charset=ISO-8859-9');
include_once
"whois.php";

if (
php_sapi_name() == "cli") {
   
$domain = $argv[1];
}
else if (isset(
$_REQUEST['domain'])){
   
$domain = $_REQUEST['domain'];
}
else{
   
$domain = '';
}

$whois = new cWhois;
$whois->setDomain($domain);
$data = $whois->whois();

echo
"<pre>".$data."</pre>";