212N3rD
Cadet 4th Year
- Dabei seit
- Juli 2008
- Beiträge
- 70
script zeigt immer "OFFLINE" an!
warum?
warum?
Code:
<?php
$superarray=array('http://www.google.de/','http://apple.com/');
for($i=0; $i < count($superarray); $i++)
{
echo $url=$superarray[$i]."<br>";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch);
$retcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($retcode==200) {
echo"ONLINE<br>";
} else {
echo "OFFLINE<br>";
}
};
?>