Hello, i am new here so any help would be appriciated!

I am basically looking for a function to do this:


PHP Code:
$result QueryWebsite($WebsiteURL);
  if (
$result) { return true; } else {return false;} 
The function would query the website, if a reply is recieved, then the website is active, if not it is inactive and i can use email alerts to email me.. etc..

I am a web developer and this is going to be part of a web design manager so i can see if any sites i maintain have been inactive.

Thanks in advance