-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
never do this:
do { $x = file_get_contents("http://www.example.com/"); } while ($x === false);
or this:
while (!feof($f)) { $x .= fgets($f); }
why not: because if the i/o fails, your script will run forever, using 100% cpu, doing nothing.
instead, add error checking, and exit if there's a problem:
if (($x = file_get_contents("http://www.example.com") === false) { echo "shit happened\n"; exit; }
please make sure none of your scripts have this problem, because they cause issues for all users on the toolserver.
- river.