<?php
include'config.php';
$id=$_GET['id'];
if(isset($id)){
header("Content-type: image/jpeg");

header("Content-type: application/jpeg");

$url='http://pic.sever.ru/pic/'.$id;
$path=pathinfo($url);
$save=str_replace('Sever_Ru','Kazfan.ru',$path['basename']);
$save=$sait.$save;
header('Content-Disposition: attachment; filename="'.$save.'"');
$img=imagecreatefromjpeg($url);
echo imagejpeg($img);  }
?>
