PHP Classes

PHP Whois Lookup Class: Get details about a registered domain using whois

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 186 All time: 8,645 This week: 140Up
Version License PHP version Categories
easy_whois 1.0The PHP License5Networking, PHP 5
Description 

Author

This class can get the details about a registered domain using whois.

It takes an URL of a site or the name of a given domain and sends a request to a whois server to get information about a domain if it is registered.

The class can parse the whois server response and extract details like the domain expiry date.

Picture of Kemal GENIS
  Performance   Level  
Name: Kemal GENIS <contact>
Classes: 7 packages by
Country: Turkey Turkey
Age: 41
All time rank: 233540 in Turkey Turkey
Week rank: 273 Up6 in Turkey Turkey Up

Example

<?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>";


  Files folder image Files (2)  
File Role Description
Accessible without login Plain text file index.php Example Example script
Plain text file whois.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:186
This week:0
All time:8,645
This week:140Up
User Comments (2)
please in portuguese
5 years ago (Navagador de internet)
70%StarStarStarStar
please in portuguese
5 years ago (Navagador de internet)
70%StarStarStarStar