Page 1 of 1

Javascript's outerText in php

Posted: Sat Dec 06, 2003 9:52 pm
by anjanesh
Hi
Javascript's document.documentElement.outerText will give the text version of the page. I need the exact same thing in php because I am writing a code for searching the website and I don't want the tags to come in the way.
Thanks

Posted: Sun Dec 07, 2003 2:03 am
by volka
you can read the file contents and use strip_tags to get rid of the tags
see also:
http://php.net/file_get_contents (PHP 4 >= 4.3.0)
http://php.net/file
http://php.net/strip_tags