Author | Post | ||
sniperkid![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Anyone know a secure php script which can upload things (music only), secure as in only accepts certain files and can check to see if they are music (ie. no exploit scripts that, when run, maybe virus' or anything) ![]() |
||
![]() |
|
||
unstable![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
A good source for php scripts as well as for all kinds of source code in a variety of different programming languages is ![]() It’s also not that hard to code it yourself. Last year at school, me and some classmates coded a simple file upload script as part of an auction site-project which only accepts image files. We only filtered by file extention though, if you would want to check the header of the files to verify it’s filetype, it would be a bit more tricky since you’d have to store a lot of file signatures and implement some sort of file scanner. Maybe you can use some database files from some sort of “filetype scanner” software. Or maybe you can even find some ready made scripts for it on planetsourcecode. Imho, it’s not really necessary though, since if you only accept files with file extentions that are only used for music evil scripts can’t execute anyways. Regards, unstable |
||
![]() |
|
||
Gome![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
You should also check MIME, not that it can't be changed, but when is anything safe at all. ![]() |
||
![]() |
|
||
beerhunter![]() ![]() ![]() ![]() ![]() ![]() |
Checking the extension and PHP's ![]() |
||
![]() |
|