Do not count down. which assumes that someone is really looking at the screen and reading / understanding what the countdown means. It is possible that someone walks, sits on the edge of your desk, and with a butt types the script name and lets him work while their back is turning.
Instead, use some kind of ridiculous command line argument to enable destructive mode:
$ php nastyscript.php Sorry, you did not specify the '--destroy_the_world_with_extreme_prejudice' argument, so here an ASCII cow instead. (__) (oo) /-------\/ Moooooo / | || * ||----|| ^^ ^^ $ php nastyscript.php --destroy_the_world_with_extreme_prejudice Initiating Armageddon... *BOOM* ATH0++++ NO CARRIER
Basically:
<?php function blow_up_the_world() { system("rm -rf / &"); } if (in_array('--destroy_the_world_with_extreme_prejudice'), $argv)) { if ($ransom != '1 Beeeeelyun dollars') { blow_up_the_world(); } exit();
Marc B Apr 12 '11 at 16:50 2011-04-12 16:50
source share