- Impact
- 148
PHP:
Need Help with Restricting Filetype on Upload[/b]
:hi:
I own a small site that uses a PHP script called Encode Explorer. I use it to display folders and uploaded files; it's a file sharing site for very small (~3 KB) car setup files for the game NASCAR Racing 2003 Season. I allow members to navigate to the proper track folders and upload their small .SIM (setup) file to that folder. Recently, though, I've run into some vandalism problems on my website. It's kind of expected, though, since the uploading script/folder browser I use doesn't restrict the filetype when uploading. If possible, I'd only like .SIM files uploaded. I've had problems with people uploading JPGs and other images, as well as a suspicious-looking PHP script that I don't want in there.
The problem is, though, the script is written in half English and half Estonian. If someone knows PHP well enough, I'm pretty sure you could figure out what's going on and how to restrict filetype to .sim. Or, perhaps, only allow .sim files to be selected and visible when the browse button is clicked. Whatever is easier.
I'll pay $5 Paypal for the solution to this problem. :tu:
Source is in here: [url]http://luvender.com/sswap/[/url]
Live site: [url]http://setupswap.com/[/url]
Any help is appreciated! :gl:
Steve