PHP strip_tags() problem?



I am trying to strip all HTML tags from HTML document using PHP strip_tags. It does not work:

Here is my script :

<?php
<?
$file=readfile("http://server/file.html";);
if (!(
$string strip_tags($file))) print "<br> error ! <br>";
$strings strtolower($string);
print 
"strings: $strings";
?>

It doesn't lower case anything and it does not strips tags at all. Obviously there is something I am missing here, but what ?

Thanks for your thoughts



In your script, user php fopen() or php fread() instead of php readfile(). I think that is the problem.

Your php strip_tags() looks correct.

Thanks. fread() worked for me.