$document = file_get_contents('http://us3.php.net/manual/en/function.dom-domdocument-load.php'); $xml = new DOMDocument; $xml->load("http://www.filmbrain.com/filmbrain/2007/02/berlinale_diary_2.html"); function html2txt($xml){ $search = array('@]*?>.*?@si', // Strip out javascript '@]*?>.*?@siU', // Strip style tags properly '@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags '@@' // Strip multi-line comments including CDATA ); $text = preg_replace($search, '', $xml); return $text; } echo $text; ?> but i get a lot of errors like this: Warning: DOMDocument::load() [function.DOMDocument-load]: Entity 'laquo' not defined in http://www.filmbrain.com/filmbrain/2007/02/berlinale_diary_2.html, line: 61 in C:\wamp\www\dom_load.php on line 6 Warning: DOMDocument::load() [function.DOMDocument-load]: Entity 'nbsp' not defined in http://www.filmbrain.com/filmbrain/2007/02/berlinale_diary_2.html, line: 82 in C:\wamp\www\dom_load.php on line 6 Warning: DOMDocument::load() [function.DOMDocument-load]: Entity 'nbsp' not defined in http://www.filmbrain.com/filmbrain/2007/02/berlinale_diary_2.html, line: 166 in C:\wamp\www\dom_load.php on line 6 Warning: DOMDocument::load() [function.DOMDocument-load]: Entity 'nbsp' not defined in http://www.filmbrain.com/filmbrain/2007/02/berlinale_diary_2.html, line: 166 in C:\wamp\www\dom_load.php on line 6