Checking Site Question

Hello,

Is it possible to check to see if a web site is up and running in PHP.

Can you send something to a website and if the site is up it sends back a certain value, but if it is not running then it can send back a different value?

Any help will help!

Thanks