Файл: scr1.php
Строк: 28
<?php
require_once './config.php';
if(CACHIMG == 1) {
if('t/' < trim($_GET['id'])) {
$url = 'http://img.faptv.ne'.trim($_GET['id']).'';
$path = './cache/scr/'.md5($url).'';
if (file_exists($path))
{
header('Content-Type: image/jpeg');
echo file_get_contents($path);
}
else
{
if (stristr($url, 'icon.png'))
{
copy($url, $path);
}
else
{
$img = ImageCreateFromJPEG($url);
$color = imagecolorallocate($img, 99, 184, 255);
//настройка
$font = 'arial.ttf';
$text = '';
$img_x = imagesx($img);
$img_y = imagesy($img);
$imgx = ($img_x - $img_x) + 5;
$imgy = $img_y - 10;
imagettftext($img, 14, 0, $imgx, $imgy, $color, $font, $text);
imagejpeg($img, $path, 100);
}
header('Content-Type: image/jpeg');
echo file_get_contents($path);
}
}
else
{ $url = 'http://img.titstube.t'.trim($_GET['id']).'';
$path = './cache/scr/'.md5($url).'';
if (file_exists($path))
{
header('Content-Type: image/jpeg');
echo file_get_contents($path);
}
else
{
if (stristr($url, 'icon.png'))
{
copy($url, $path);
}
else
{
$img = ImageCreateFromJPEG($url);
$color = imagecolorallocate($img, 99, 184, 255);
//настройка
$font = 'arial.ttf';
$text = '';
$img_x = imagesx($img);
$img_y = imagesy($img);
$imgx = ($img_x - $img_x) + 5;
$imgy = $img_y - 10;
imagettftext($img, 14, 0, $imgx, $imgy, $color, $font, $text);
imagejpeg($img, $path, 100);
}
header('Content-Type: image/jpeg');
echo file_get_contents($path);
}}
}
?>