$purl['host']) : //header("HTTP/1.1 307 Temporary Redirect"); //header("Location: http://$HTTP_HOST",TRUE,307); //header("HTTP/1.0 403 Forbidden"); //exit; //endif; header("Pragma: public"); header("Expires: ".gmdate("D, d M Y H:i:s",time()+15724800)." GMT"); if (!$fn) : $path=pathinfo($f); $fn=$path['basename']; endif; $src="C:/Neo-Fringe/$f"; $gis=getimagesize($src); header("Content-Type: ".$gis['mime']); list($w,$h,$t)=$gis; if (!$nw||$w<$nw) : $nw=$w; endif; if (!$nh||$h<$nh) : $nh=$h; endif; if ($w<>$nw||$h<>$nh) : $r=$w/$h; if (($nw/$nh)>$r) : $nw=intval($nh*$r); else : $nh=intval($nw/$r); endif; header("Content-Disposition: inline; filename=\"".$nw."x".$nh."_".$fn."\""); //header('Content-Encoding: gzip'); if ($t==2) : $nimg=imagecreatetruecolor($nw,$nh); imagecopyresampled($nimg,imagecreatefromjpeg($src),0,0,0,0,$nw,$nh,$w,$h); imagejpeg($nimg,NULL,95); elseif ($t==1) : $nimg=imagecreate($nw,$nh); imagecolortransparent($nimg,imagecolorallocate($nimg,0,0,0)); imagecopyresampled($nimg,imagecreatefromgif($src),0,0,0,0,$nw,$nh,$w,$h); imagegif($nimg); elseif ($t==3) : $nimg=imagecreatetruecolor($nw,$nh); imagealphablending($nimg,false); imagefilledrectangle($nimg,0,0,$nw,$nh,imagecolorallocatealpha($nimg,0,0,0,127)); imagealphablending($nimg,false); imagesavealpha($nimg,true); imagecopyresampled($nimg,imagecreatefrompng($src),0,0,0,0,$nw,$nh,$w,$h); imagepng($nimg); endif; else : header("Last-Modified: ".gmdate("D, d M Y H:i:s",filemtime($src))." GMT"); header("ETag: \"".md5_file($src)."\""); header("Content-Disposition: inline; filename=\"$fn\""); @readfile($src); endif; //ob_flush(); ?>