用于生成缩略图的PHP代码[重复]

Possible Duplicate:
how to make thumbnails with php

I have a php upload script that enables users to upload images to a folder on an ftp server. I am after (if possible) some code for a web page that creates thumbnails of the images and then lets the user click on each of these images and the full image is displayed.

I have found some pages via google with descriptions to this effect, yet haven't found an easy way to do this.

Please help

thanks

Haven't tried this before. Check out ImageMagick

$image = new Imagick();
$image->setOption('jpeg:size', '800x532');
$image->readImage('foo.jpg');