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