|
Posted by Good Man on 04/05/06 19:42
attenborough@gmail.com wrote in news:1144254343.160828.190140
@i40g2000cwc.googlegroups.com:
> Hi, am hoping that someone may be able to me. Im designing a small
> website using PHP and MySQL. I would like to allow my visitors to
> upload a photo via a form on it. Im worried that people will be trying
> to upload 1mb+ images, so i am looking for a php script that will
> resize that image down to a managable 50kb file (or there abouts) and
> also give me a small thumbnail to use. Presumably then the script would
> also delete the original 1mb+ photo from the server. Ive been searching
> through google for an answer, but with not a great deal of luck. Thanks
> in advance.
there are quite a few at http://www.phpclasses.org
http://www.phpclasses.org/browse/package/1365.html is one
http://www.phpclasses.org/browse/package/2791.html is another
I think both use GD.
I use one written by Timothy Kanters for many of my applications. It works
great. I tried to find a link, but it seems his website is offline. While
it was obviously given out for free, there is nothing specifically
mentioned in the comments about handing the code down. So, I'm a little
hesitant to cut and paste the class here.
I've also used this one:
http://www.phpbuilder.com/snippet/download.php?type=snippet&id=1499
As far as dealing with the uploads and deleting the original image, that
will be up to you to write a fairly simple script for dealing with them.
[Back to original message]
|