html to text with domdocument class

Posted by turbod on Stack Overflow See other posts from Stack Overflow or by turbod
Published on 2010-03-19T17:08:00Z Indexed on 2010/03/19 17:11 UTC
Read the original article Hit count: 447

Filed under:
|
|

How to get a html page source code without htl tags? For example:

<meta http-equiv="content-type" content="text/html; charset=utf-8" /> 
<meta http-equiv="content-language" content="hu"/> 
<title>this is the page title</title>
<meta name="description" content="this is the description" />
<meta name="keywords" content="k1, k2, k3, k4" />
start the body content
<!-- <div>this is comment</div> -->
<a href="open.php" title="this is title attribute">open</a>
End now one noframes tag.
<noframes><span>text</span></noframes>
<select name="select" id="select"><option>ttttt</option></select>
<div class="robots-nocontent"><span>something</span></div>
<img src="url.png" alt="this is alt attribute" />

I need this result:

this is the page title this is the description k1, k2, k3, k4 start the body content this is title attribute open End now one noframes tag. text ttttt something this is alt attribute

I need too the title and the alt attributes. Idea?

© Stack Overflow or respective owner

Related posts about php

Related posts about html