header("Expires: Mon, 26 Jul 1997 01:00:00 GMT"); header("Last-Modified: ". gmdate("D, d M Y H:i:s"). " GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Cache-Control: post-check=0,pre-check=0"); header("Cache-Control: max-age=0"); header("Pragma: no-cache"); /* || 1.02 20Apr02 Torrent Use of Super Globals (4.1.x) || || ==================== Purpose ====================== || This script allows you to make a printable version || of any web page. Its strength lies in the fact that || it does this for both static and/or dynamically || produced pages through the use of HTTP GET method, || without writing a file to the server. || =================================================== || || Installation instructions: || 1. Copy the file to a folder on your server. || 2. For your other web pages make a link to phprint.php || e.g. Print Me || 3. Add into your web pages the "start" and "end" || comments ( & || 4. Test it out by clicking on the links in those pages || || ==================================================== */ if ($_SERVER['HTTP_REFERER']){ $url = $_SERVER['HTTP_REFERER']; } else { // Default page to go to if the script was not invoked // through an HTTP referral (i.e. they didn't follow a // link). Change this to a default page of your choosing. $url = "http://www.horses-and-ponies.com/"; } // These are the tags that determine where the printable // content starts and where it should end. Remember to add // them to your web pages. :) $START_CONT=""; $END_CONT = ""; $content=0; $parsed_url = parse_url($url); $myServer = $parsed_url['host']; $document = $parsed_url['path']; // replaces any space in the query with + $url = preg_replace('/[[:space:]]/','+',$url); if($document[strlen($document)-1]=='/'){ // If your home page has a name other than // index.php then change this here. $document = "$document/index.htm"; $base_url = dirname($document); } ?>