<?
class c_services_get_file
{
 function show()
 { 	if ($_GET['temp_fname']) $cont=file_get_contents($_SERVER['DOCUMENT_ROOT'].'/temp/'.$_GET['temp_fname']) ;
    if ($cont)
    { header('Content-Description: File Transfer');
      header('Content-Transfer-Encoding: binary');
      header('Cache-Control: public, must-revalidate, max-age=0');
      header('Pragma: public');
      //header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
      header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
      header('Content-Length: '.strlen($cont));
      header('Content-Type: application/force-download');
      header('Content-Type: application/octet-stream', false);
      header('Content-Type: application/download', false);
      header('Content-disposition: attachment; filename="'.basename($_GET['temp_fname']).'"');
      echo $cont ;
    } else echo 'Файл не найден' ;
 }
}

?>