hey,
I'm trying to create some PHP Code which will allow me to create a "text only" page of my website...
I've found part of the code on PHP.net in the code notes part...
...here it is!
$handle = fopen($_GET['file'], "r");
$contents = fread($handle, filesize($_GET['file']));
function removeEvilTags($source)
{
$allowedTags='<a><br><b><h1><h2><h3><h4><i>' .
'<li><ol><p><strong><table>' .
'<tr><td><th><u><ul><html><body><title><head>';
$source = strip_tags($source, $allowedTags);
return $source;
}
$text = removeEvilTags($contents);
echo $text;
I call the parser like this
parser.php?file=index.php
the proplem is, index.php has includes, such as
<php include "header.php"; ?>
when I load in index.php the include header part isnt included... how can I get the index.php file to load as a complete page, THEN parse it?
thanks...