Simple WHOIS PHP Script

WHOIS is a protocol that is widely used for querying databases in order to determine the registrant or assignee of a domain name or IP address (range). In its simplest form, building a small PHP script to query the appropriate WHOIS server and outputting readable information is quite simple, yet complex solutions are usually required to extract full functionality from the WHOIS system.

Below is a very simple script to simply output the registrant of a domain name stored in WHOIS records. There’s minimal security, it doesn’t do much other than check the registrant, it’s poorly coded and it’s not very useful… but it will provide a list of servers and a function or two that may be of use.

Useful Links

>> Delegation details of top-level domains (iana.org)
>> WHOIS on WikiPedia.


Download: Simple WHOIS script
Description: Simple WHOIS script using PHP.
Author:Marty
Category: PHP code
Date: January 12, 2010

If you liked this article, you may also like:

  1. Simple PHP file counter
  2. Force the Download of a File with PHP
  3. Print all files from and below a directory with PHP
About Marty

is a passionate web developer from Sydney, Australia. He owns about 400 websites and makes a healthy living from working the web. As a day job, he works as a pilot for an international airline. You can follow Marty on Twitter or Google+.

Comments

  1. MTyler says:

    This code is featured on our University website so it probably explains the spike in visitors.

  2. Terrance says:

    How do I style this and put in Captcha?

  3. ToadFish says:

    Works great & easy to customize into a real working script. You could release this with Captcha and make it a lot easier for those that don’t know how. Good job Marty.

  4. Simon Peter says:

    Simple. Easy. Works. Thank you so, so much.

  5. CT says:

    This script doesn’t work for .co.uk .org.uk .me.uk … any ideas?


    “Please check the following errors:
    Domain extension either invalid or unavailable.”

Speak Your Mind

*