<?
$font='Turtles.ttf'; 
$line=''.$_SERVER['HTTP_HOST'].''; 
$head='image/jpeg'; 
if (isset($_GET['file']) and preg_match('/^[A-z0-9_\.\/\-]+$/',$_GET['file'])) {
$url='http://ru.fishki.net/picsw/'.$_GET['file'];
$get=get_headers($url,1);
if ($get[0]!='HTTP/1.1 200 OK') {header ('location:index.php'); exit;} 
if ($get['Content-Type']==$head) 
{$new_image=@file_get_contents($url);
$new_image=imagecreatefromstring($new_image);
$f=imagecolorallocate($new_image,200,200,200);

header('Content-Type: image/jpeg');
imagejpeg($new_image);
imagedestroy($new_image);}else{header ('location:'.$url);}
}else{header ('location:index.php');} 
?>