Home
MyOwnSearch
MyBannerExchange
FAQBase
ForumHost
GuestBookHost
FreeImageHost
FreeMySQL
GlobalWhois
PHPScriptIndex
PhotoRate
SquawkBox


"GlobalWhois"
(Uses PHP4, does not require MySQL)



Note: This is the script that previously was sold under the name 'phpGlobalWhoisPro', but now is offered free.

This script (whois.inc) is to be used as an INCLUDE in your own script, or you may convert example.php to match your own website. Use example.php as a reference when incorporating phpGlobalWhois into your own script.

phpGlobalWhois is a simple script that will do a Whois lookup against any domain with any TLD (Top Level Domain). A built-in array of whois servers tells the script which whois server to use to perform the lookup.


These are the lines to include in your script:
$dom = (the domain name to look up)
include "./whois.inc";
$whoisresult = lookup($dom);
$whoisresult[0] // This value will be "1" is the domain is available, or blank if it's not.
$whoisresult[1] // This value holds the full text returned from the whois server.

$whoisresult[1] returns the full text of the whois result. If the lookup failed, either because the server was down, or because the TLD of the domain wasn't in the array, then $whoisresult[1] will
be returned empty.

$whoisresult[0] returns a "flag" that indicates if the domain is registered or not. This is most useful in scripts that do mass-availability checks against a list of domains, automatically checks domains frequently, or checks individual domains so a visitor can register one through your website.

If you find a TLD not listed in whois.inc that you really need to have added, you can study the array in whois.inc to see how to edit it. You WILL also need to visit that particular TLD's registrar and do a little research to find out the whois server and what text you'll need to 'grab' when a domain is available.


IM Me on Yahoo