yretuta
yretuta

Reputation: 8091

check if a site exists with PHP

is there a script in php to check if a site exists in the world wide web?

  1. submit a url
  2. script check if site is existing
  3. return true if it does

Upvotes: 0

Views: 660

Answers (3)

ninesided
ninesided

Reputation: 23263

Whilst firing off an HTTP request will tell you if a site exists, it doesn't tell you whether the domain has been registered but is not currently in use. If this is something that you'd need to be able to do, you need to use a WHOIS service to check whether the domain is registered or not.

Upvotes: 0

Andrew Hare
Andrew Hare

Reputation: 351466

Here is an implementation using CURL:

Check website status using php and CURL library

Upvotes: 2

Joey
Joey

Reputation: 354386

You can just try to issue an HTTP request and see if something comes back.

Upvotes: 1

Related Questions