Welcome to Fail Fail!



Are you ready, NON FAILBOOK USER?

You will see the top part of a picture. See if you can figure out what kind of fail the picture is - mutt (dogs/animals) or epic (humans/signs/etc)! After you guess, the full picture will be revealed! Scores are not saved, no personal information is stored, all rights reserved, and use at your own risk. Images are from the excellent failblog.org and faildogs.com, and the game code for Fail Fail is made by http://vazor222.livejournal.com. Enjoy!




\n"; } // print the result if( isset($_POST['imgtype']) ) { if( $_POST['imgtype'] == $_POST['guess'] ) // 0=mutt, 1=epic { print "WIN!
\n"; ++$score; } else { print "FAIL!
\n"; } } // print the total score so far print "Score so far for this session:".$score; print "\n"; print "
\n\n"; } else { // decide random type $imgtype = mt_rand(0,1); // get random page if( $imgtype == 0 ) // 0=mutt, 1=epic { // mutt - dogs = 71 $pagenum = mt_rand(1,71); $failpage = "http://faildogs.com/page/".$pagenum."/"; $pagematch = "@]*>\nopening failpage:".$failpage; $file = fopen ($failpage, "r"); if (!$file) { echo "Fail Fail remote open FAIL! Unable to open remote file, please try again later.
\n"; exit; } $imgsrc = "http://failblog.files.wordpress.com/2009/09/epic-fail-police-crash-fail.jpg"; $randpick = mt_rand(1,9); //print "
\ngetting imgsrc randpick:".$randpick; while (!feof ($file)) { $line = fgets ($file, 1024); /* This only works if the title and its tags are on one line */ //print "
\nmatching with ".htmlspecialchars($pagematch)." on line ".htmlspecialchars($line)." "; if (preg_match ($pagematch, $line, $out)) { //print "
\ngetting imgsrc matched line:".$line; $imgsrc = $out[1]; //print "
\ngetting imgsrc imgsrc:".$imgsrc; if( --$randpick == 0 ) break; } } fclose($file); //print "
\ngot imgsrc imgsrc:".$imgsrc."
\n"; print "\n"; print "\n"; // print half of it $img_w = 500; list($img_w,$img_h) = @getimagesize($imgsrc); print "
\n"; print "

\n"; // print guess form ?>
Mutt Fail Epic Fail