eits Posted October 30, 2007 Share Posted October 30, 2007 [move]I am not too hot on PHP but desperately require some help from you people![/move] I am looking to create a file upload facility which will only accept JPG, GIF and BMP files which are below 5MB and are a particular size (80mm x 200mm). Could somebody please point me to some example code which can demonstrate this as I have absolutely no idea how to proceed. I am currently using a simple file upload script but it will not be no good as I understand PHP file upload is a very unsecure business and the upload is going to be available to the public. Not Great! Thanks in advance for the help! Quote Link to comment https://forums.phpfreaks.com/topic/75349-php-file-upload/ Share on other sites More sharing options...
MadTechie Posted October 30, 2007 Share Posted October 30, 2007 post what you have.. also reading the manual helps Chapter 38. Handling file uploads Quote Link to comment https://forums.phpfreaks.com/topic/75349-php-file-upload/#findComment-381081 Share on other sites More sharing options...
eits Posted October 30, 2007 Author Share Posted October 30, 2007 I am now using the code shown on: http://www.webcheatsheet.com/PHP/file_upload.php which seems fairly secure?!? Problem being I still need to allow gifs and bmp files and there is no check as to what dimensions the image is. Quote Link to comment https://forums.phpfreaks.com/topic/75349-php-file-upload/#findComment-381083 Share on other sites More sharing options...
aschk Posted October 30, 2007 Share Posted October 30, 2007 file size is easy enough to do in PHP, however I think in order to process dimensions you'll need to utilise GD which SHOULD now be part of the standard PHP build. Also, the dimensions are specified in pixels not mm for GD Quote Link to comment https://forums.phpfreaks.com/topic/75349-php-file-upload/#findComment-381085 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.