you'll want GD installed. Then use the imagecreate() & imagecopyresized() functions ...
Search for this libary of functions ;
- Leonardo Image Functions Library
- Author: Brandon Cash
you'll probally find a link to him somewhere on this site.
If not just search for thumbnail making stuff, there's plenty of snippets all over the place.