$fp = fsockopen("www.example.com", 8000, $errno, $errstr, 1); //last param is timeout in seconds
if (!$fp) {
header('Location: http://www.anothersite.com/some_message');
} else {
fclose($fp); // radio OK
}
The code is not working and do not redirect.