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