"; if (empty($_POST["desired_filename"])) { $file_name = $_FILES["fileToUpload"]["name"]; } else { $file_name = $_POST["desired_filename"]; } // check if file-name has any... undesirable characteristics if (strstr($file_name, " ")) { $file_name = str_replace(" ", "_", $file_name); } if (strstr($file_name, "..")) { $file_name = str_replace("..", "_", $file_name); } if (strstr($file_name, "/")) { $file_name = str_replace("/", "_", $file_name); } // and now we pretend that never happened $dest_dir = "p/"; $dest_file = $dest_dir . $file_name; $beaming_permitted = 1; if (file_exists($dest_file)) { echo "
WE'RE GETTING SOME INTERFERENCE
"; echo "PLEASE USE A DIFFERENT COIN-NAME
"; $beaming_permitted = 0; } elseif ($_FILES["fileToUpload"]["size"] > 50000000) { echo "THIS COIN WILL BE UP FOR AT LEAST THREE MONTHS
"; echo "7 MOONS IN THE ORDINARY SABBATICAL CYCLE
"; echo "AFTER THAT, IT *MAY* BE DE-ATOMIZED
>"; } elseif ($_FILES["fileToUpload"]["size"] < 25000000) { echo "THANK YOU FOR FEEDING ME
"; echo "YOUR COIN IS IN SAFE HANDS
"; echo "IT WILL NOT BE DE-ATOMIZED FOR AT LEAST A YEAR
"; } if ($beaming_permitted == 0) { echo ""; echo "sorry <\\3
"; echo "IT IS HERE
"; echo "...
"; echo "THAT WAS WEIRD, SOMETHING WENT WRONG. TRY AGAIN.
"; echo "