Example.
Lets say your big images (those uploaded) are stored in /home/yoursite/public_html/images/ folder. You want to show thumbnails of those images.
Save script (i.e. thumb.php) into /home/yoursite/public_html/ folder (i.e. one folder up from where big images are).
You need to put following HTML code on your pages to show images:
<img src="http://asite.com/thumb.php?src=images/some-image-01.jpg&x=50&y=50&f=0">
Above code would show small image of the some-image-01.jpg.
Does that help?