Page 1 of 1

Finding out if a domain/site exists

Posted: Thu Aug 17, 2006 7:28 pm
by anthony88guy
I have a scenario where a user must enter a website. I’d like to validate the site by pinging it or something similar. I've searched php.net for all keywords that came to mind, but came back empty handed.

Thanks.

Posted: Thu Aug 17, 2006 7:31 pm
by feyd
A whois lookup? or maybe gethostbyname() or a sibling of it?

Posted: Thu Aug 17, 2006 7:34 pm
by Benjamin

Posted: Thu Aug 17, 2006 7:41 pm
by feyd
be aware, dns_get_record() is for PHP 5, although there is a user comment supposedly linking to a backport.