Jump to content

Domain PHP Whois help


vick22

Recommended Posts

Hello,

I a  newbie in php.

 

I just wrote a simple whois to show me if the domain is registered or not but I am not able to get the desired results. Where exactly have i gone wrong?

 

I am able to successfully whois on domain of country specific TLD when the give output as "Not Available" but i fail on .com for some reason. Not sure why? Can someone help me.

 

<?php 

 

 

$foo = system('whois justtestdomain.com');

if(strstr($foo, 'No match for domain'))

{

  echo "Not Available";

}

else {

echo "Available!";

}

 

?>

Link to comment
https://forums.phpfreaks.com/topic/174008-domain-php-whois-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.