note 56124 added to function.header

From: Date: Wed, 24 Aug 2005 10:42:14 +0000
Subject: note 56124 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-94119@lists.php.net to get a copy of this message
Dear Ladies and Germs, This works for both IE and Firefox using sessions on a windows server (apache 1.3.29,php 4.3.8) and linux server (apache 2.0+ and php 5.0+): //You will need to substitute in your own binary file read algo or function here $temp = read_file ("/path/to/your_file.pdf"); header("ETag: ".md5(date("YmdHis"))); header("Accept-Ranges: bytes"); header("Content-type: application/pdf"); header("Content-length: ".strlen($temp)); header("Content-Disposition: inline; filename=".$your_file_name); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Pragma: public"); echo ($temp); ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+56124 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56124&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56124&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56124&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56124&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56124&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56124&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+56124&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#94119) next »