Holy crap, Python too! Ex-BY customers only though.
Here in php we have:
PHP Code:
<?php
// Try to open a socket to the server at home on port 80
$fp = fsockopen("myhomesever.dyndns.net", 80, $errno, $errstr, 10);
if (!$fp) {
// Site is down, so we give an error - probably a PHP error too. This could be better!
echo "The site is down.";
} else {
// Site is up, so redirect to it
header('Location:http://myhomeserver.dyndns.net');
fclose($fp);
}
?>
Quick and dirty starter for 10.