Finding out if a domain/site exists

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
anthony88guy
Forum Contributor
Posts: 246
Joined: Thu Jan 20, 2005 8:22 pm

Finding out if a domain/site exists

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

A whois lookup? or maybe gethostbyname() or a sibling of it?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

be aware, dns_get_record() is for PHP 5, although there is a user comment supposedly linking to a backport.
Post Reply