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.
Finding out if a domain/site exists
Moderator: General Moderators
-
anthony88guy
- Forum Contributor
- Posts: 246
- Joined: Thu Jan 20, 2005 8:22 pm
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
A whois lookup? or maybe gethostbyname() or a sibling of it?
Code: Select all
dns_get_record()- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
be aware, dns_get_record() is for PHP 5, although there is a user comment supposedly linking to a backport.