What is a secure way to allow Web page visitors to upload Real Media files to a server through a form? I suspect I should use ftp_put and first check the mime type of the file with $userfile_type, but I want to make sure a malicious user can't find a way to lie to the server about what is really contained in the file (something that couild destroy the Web site or server).