PHP Code: Verbindungsprüfung
So kann man ganz eichfach feststellen ob eine Seite erreichbar ist oder nicht.
<?php
$host = "www.google.de";
$url = "http://$host/";
$check = @fsockopen($host, 80);
if ($check) {
echo "Verbindung erfolgreich!";
} else {
echo "Verbindung <b>NICHT</b> erfolgreich!";
}
?>
Tags: Check, PHP, Prüfung, Server, Verbindung
