This project was inspired by an incident were somebody tired to pass off material from a public document found in the Internet as his own. Fortunately, a Google search was done on a random paragraph to yield surprising results.
< ?php require_once("include/nusoap/nusoap.php"); ?> < ?php if ($_POST['upload'] == "true") { ?> < ?php if ($_FILES['userfile']['size'] > 500000) { ?> File Size (< ?php echo $_FILES['userfile']['size']; ?>) Not Supported. < ?php } else if ($_FILES['userfile']['type'] != 'text/plain') { ?> File Type (< ?php echo $_FILES['userfile']['type']; ?>) Not Supported. < ?php } else { /* grab string */ $fh = fopen (trim(stripslashes($_FILES['userfile']['tmp_name'])), "r"); if ($_FILES['userfile']['size'] > 10240) { fseek ($fh, rand (20, 100) * 10); } if ($_FILES['userfile']['size'] > 1024) { fseek ($fh, rand (10, 90) * 10); } else { fseek ($fh, rand (5, 10) * 10); } $text = fread ($fh, 512); $haystack = preg_replace("/\s+/", " ", $text); $bquery = strstr ($haystack, ' '); fclose ($fh); $end = strpos ($bquery, ' ', rand (5, 10) * 10); $query = trim (substr ($bquery, 0, $end)); echo "Validation String: " . $query . "