PhoenixBlue PhoenixBlue - 1 year ago 111
PHP Question

output html page after rendering

Good day all!

I would like to be able to get contents of an HTML document after rendering, using PHP. example, if I have this HTML document:

/* some dummy code here*/
<a href="some_links"> click here friend </a>
<input type="button" />
<p>Lorem ipsum dolor sit atmen</p>

the output of the function should look like:

click here friend

Lorem ipsum dolor sit atmen

Thanks in advance for your help!
Note: please do not care much about this HTML code, it's just an example

Answer Source

Output buffering should do the job:


all of your HTML

   $content = ob_get_content();
    echo strip_tags($content);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download