In this tutorial i will explain a very useful PHP script to get the domain’s whois data. Here’s a great and simple whois lookup Api script in php, I’ve used it in my another web application.

It is 100% free for personal & commercial uses, and just has a couple functions you can call in your next projects. It’s Automatically lookup for secondary whois server and In-built IP and domain validator to get the domain owner details from whois database.

whois data

Live Demo Download Script

Whois Class file

Create whois.php file and copy paste below PHP code to get whois data for any domain. This script supports the lots of TLD (Top Level Domain) like .com,.net,.in,.org,.info and much more.

Index.php Page

Create index.php and copy paste below code to get whois data.