domain search through Linux command and PHP

tutorial for PHP, domain search through Linux command and PHP. Searching the domain information through command line. You can search the domain using the Linux command.

domain search through Linux command and PHP

#whois google.com

using the following command you can find the all domain information.

If you want check when domain created then use following command.

#whois google.com | grep “Created | Creation”

If you want to create PHP script for domain search then use following code


$domain_info = exec("whois google.com | grep 'Created |Creation'");

if($domain_info =''){

echo "Domain is not yet registered";

} else {

echo $domain_info = exec("whois google.com");

}

Above script will only work in Linux server.

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.