Código PHP:
<?
$ruta = $_GET['ruta'];
$fuente = $_GET['fuente'];
$alto = $_GET['alto'];
$ancho = $_GET['ancho'];
$fuente = @ImageCreateFromjpeg($ruta);
$imgAncho = imagesx ($fuente);
$imgAlto = imagesy($fuente);
$imagen = ImageCreate($ancho,$alto);
imagecopyresampled($imagen,$fuente,0,0,0,0,$ancho,$alto,$imgAncho,$imgAlto);
Header("Content-type: image/jpeg");
imagejpeg($imagen);
?>