tags:

views:

591

answers:

3

Ive been looking at the move_upload_files function, but i dont think thats what i need.

I need to upload a picture (max size 2mb png, jpg, gif only) then rename it, then create a thumbnail of it, and save both to the same directory. I figure ill upload/rename the main file first, then take that and create the thumbnail. But what functions should i be looking at to do this?

+2  A: 

You will at least need to look at PHP's GD functions, or better yet Imagick for creating thumbs.

There are zillions of tutorials on this, here are a couple:

Or you could just use a ready-made solution, e.g.:

karim79
+1  A: 

Have a look at phpThumb.

Mehmet Ergut
+1  A: 

PHPThumb is what you need... Just search in the api for the method that allow you to save the image. regarding upload the image.. here you have a nice tutorial about it

Gabriel Sosa