Demonstration

This will not be included on the printer friendly page.
This is the content that will be inluded on the printer friendly page.
This will not be included on the printer friendly page.

Click here for the printer friendly version.

Code

printerfriendly.php
<?PHP

#######################################################
# This script is Copyright 2003, Infinity Web Design  #
# Written by Ryan Brill - ryan@infinitypages.com      #
# All Rights Reserved - Do not remove this notice     #
#######################################################

$page = $_SERVER["HTTP_REFERER"];
$printerfriendly = "";
$contents = @file($page);
foreach ($contents as $line) {
    printerfriendly .= $line;
}
$printerfriendly = split("<!--printerfriendlycontent-->",$printerfriendly);
echo $printerfriendly[1];
?>



Comments:

Tested in: IE6, Opera 7, NN4.7, NN7, and Mozilla 1.2.
Works in: IE6, Opera 7, NN4.7, NN7, and Mozilla 1.2
Doesn't work in: N/A

Copyright© 2003, Infinity Web Design