vajra_hendry Posted October 21, 2007 Share Posted October 21, 2007 Hi Guys, Quick question in regards to upload restrictions. I have a site that allows clients to upload banners. It forms some simple checks like : if(!ereg("image",$_FILES['pix']['type'])) { echo "<b>Please only upload image files</b><br>"; } What I could really do with now is a line that checks the dimentions of the image. Basically I dont want anyone to be able to upload an image LARGER than say 125 x 125 pixels. Anyone know if this can easily be done? Much Appreciated Thanks Link to comment https://forums.phpfreaks.com/topic/74162-php-upload-validation/ Share on other sites More sharing options...
vajra_hendry Posted October 21, 2007 Author Share Posted October 21, 2007 Screwps!! I might have found the answer : http://sg2.php.net/getimagesize What an ass I am for not researching enough first before posting! Link to comment https://forums.phpfreaks.com/topic/74162-php-upload-validation/#findComment-374538 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.