Just to be clear, can the robot have another weapon in addition to the face spinner?
#5 - Make a splash, zip it and upload it (Be sure to include your name so I will know who made it)
I can make the uploader upload just .jpg and .png, but I do it like that so people will remember to name the file, or include a txt with their name. If I allow images, 90% of my entries would be screenshot.jpg and badassbot.png, then I would not know who did it. Hell, I have one or two EVERY month as it is!
if (file_exists($target_path.$_FILES['uploadedfile']['name'])) { $random_digit=rand(0000,9999); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path.$random_digit.basename( $_FILES['uploadedfile']['name']))) { echo "The file ". $random_digit.basename( $_FILES['uploadedfile']['name']). " has been uploaded <br>"; $fileurl= "http://".$_SERVER['SERVER_NAME']. "/".$target_path.$random_digit.basename( $_FILES['uploadedfile']['name']);?> </div> <div align="center"> <input name="textfield" type="text" id="textfield" value="[url=<?=$fileurl?>]<?=$fileurl?>[/url]" size="55" /> <? } else{ echo "There was an error uploading the file, please try again!"; }
}else{ ?></div><form enctype="multipart/form-data" action="index.php?do=TEST" method="POST"> <div align="center"><p> <BR><strong>Put your name in this box</strong><br /> <input type="text" name="user" /> <input type="hidden" name="MAX_FILE_SIZE" value="5000000000" /> <BR /> Upload your splash here .jpg, or .png ONLY<BR /> <BR /> <input name="uploadedfile" type="file" /> <input type="submit" value="Upload File" /> </p> </div></form> <div align="center"><br /> <? } ?> </div>
$random_digit=rand(0000,9999);
$bad_stuff = array("..", ".", "/", "\\");$random_digit = str_replace($bad_stuff, "", $_POST['user']);
You got my vote for RA2 Wizard. Always and forever.
In the first snippet, replaceCode: [Select]$random_digit=rand(0000,9999);byCode: [Select]$bad_stuff = array("..", ".", "/", "\\");$random_digit = str_replace($bad_stuff, "", $_POST['user']);