View file preview.php
<?php $url=$_GET["dir"]; $old=imagecreatefromjpeg("$url"); $w = imageSX($old); $h = imageSY($old); $w_new=70; $h_new=70; $new = imageCreate($w_new, $h_new); imageCopyResized($new, $old, 0, 0, 0, 0, $w_new, $h_new, $w, $h); Header("Content-type: image/jpeg"); imagejpeg($new); ?>