Use the imagecreate function to create a GD2 image resource, imagecreatefromX to load the original image, and imagecopyresized to resize and draw the resized image to the target resource that you created.

If the image is a photo, you may wish to apply sharpening following the resize. You can use the imageconvolution function to apply a convolution matrix to effect the sharpening.
Unsharp Mask for PHP