<?php $fp = fsockopen ("www.php.net", 80); if (!$fp) { include('on.php'); } else { fclose ($fp); include('off.php'); } ?>