$print_file = isset($HTTP_SERVER_VARS["QUERY_STRING"]) ? $HTTP_SERVER_VARS["QUERY_STRING"] : false;
if($print_file && file_exists($print_file)) {
$fp = fopen($print_file, 'r');
$to_print = fread($fp, filesize($print_file));
fclose($fp);
}
if(preg_match("/
(.*)<\/title>/si", $to_print, $matches))
$title = $matches[1];
else
$title = "[open][subvertising session]";
if(preg_match("/(.*)<\/body>/si", $to_print, $matches))
$inner_body = $matches[1];
else
$inner_body = false;
$inner_body = preg_replace("/.*/siU", "", $inner_body);
$inner_body = preg_replace("/(.*)<\/a>/siU", "\\0 [\\1]", $inner_body);
?>
echo $title ?>
echo $inner_body ?>