Re: Uploading pic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



getimagesize() can obtain the image type as well as the dimensions of the image. Once the file is uploaded us this to check the extension is correct and that the image is not too large.
php.net/getimagesize

Andrew

----- Original Message ----- From: "Rosen" <rosen@xxxxxxxxxxxxxx>
To: <php-general@xxxxxxxxxxxxx>
Sent: Thursday, April 27, 2006 2:15 PM
Subject:  Uploading pic


Hi,
I have this problem with uploading images:
I try several PHP classes for upload of files on server ( pictures in my case ), but if some user only renames some file as ".jpg" the script uploads the file even the file format is not .jpg - i.e. - file "test.mpg" - the user renames it to "test.jpg" - and the script upload it on server. Of course after this the website don't show any pi - it shows like pic does not exists.

I need also to control the dimension of pictures ( in pixels), size in kb and type of files ( .gif, .jpg ).

Is there a way to do this with some script ?

Thanks,
Rosen

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux