Javascript's outerText in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Javascript's outerText in php

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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
Post Reply