View file imagesearch/resize.php
<?php
error_reporting(0);
if (isset($_POST['re'])) :
$url = ($_POST['url']);
$w = isset($_POST['w']) && !empty($_POST['w']) ? (int)$_POST['w'] : 200;
$h = isset($_POST['h']) && !empty($_POST['h']) ? (int)$_POST['h'] : 200;
include ("resize-class.php");
$resizeObj = new resize($url);
$resizeObj -> resizeImage($w, $h, 'exact');
$save_as = 'images/' . basename(urlencode($url));
$resizeObj -> saveImage($save_as, 100);
header("Location: $save_as");
exit();
endif;