Forum Moderators: coopster
if(checkSite("http://www.google.nl"))
echo "Found";
else echo "not Found";
function checkSite($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url );
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$text = curl_exec($ch);
$test = strpos($text, "<!-- BEGIN TEST CODE -->");
if ($test === false)
return false;
else return true;
}