<?php require 'img.php'; if (isset($_GET['img'], $_GET['width'], $_GET['height']) && $_GET['width'] && $_GET['width'] > 0 && $_GET['width'] < 500 && $_GET['height'] < 500) { $file = $_GET['img']; if (!file_exists($file)) exit('Такого файла нет'); $img = new img($file); $img ->img_down() ->resize((int)$_GET['width'], (int)$_GET['height']) ->print_img(pathinfo($file, PATHINFO_EXTENSION)); } else { header('Location: index.php?isset=403'); die(); }