Файл: img.php
Строк: 16
<?php
header('Content-type: image/gif');
$img = $_GET['img'];
$wh = getimagesize('copy.png');
$fh = getimagesize('http://www.xxxvideo-arhiv.net/usr/'.$img);
$rwatermark = imagecreatefrompng('copy.png');
$left=$fh[1]-$wh[1]-190;
$sx=$fh[0]-$wh[0]-0;
if(pathinfo($img, PATHINFO_EXTENSION)=='jpg' || pathinfo($img, PATHINFO_EXTENSION)=='jpeg')
{
$rfile = imagecreatefromjpeg('http://www.xxxvideo-arhiv.net/usr/'.$img);
imagecopy($rfile, $rwatermark, $sx, $sy, 0, 0, $wh[0], $wh[1]);
} elseif(pathinfo($img, PATHINFO_EXTENSION)=='gif')
{
$rfile = imagecreatefromgif('http://www.xxxvideo-arhiv.net/usr/'.$img);
imagecopy($rfile, $rwatermark, $sx, $sy, 0, 0, $wh[0], $wh[1]);
} elseif(pathinfo($img, PATHINFO_EXTENSION)=='png')
{
$rfile = imagecreatefrompng('http://www.xxxvideo-arhiv.net/usr/'.$img);
imagecopy($rfile, $rwatermark, $sx, $sy, 0, 0, $wh[0], $wh[10]);
}
imagegif($rfile,'', '1');
imagedestroy($rwatermark);
imagedestroy($rfile);
?>