I have a sample code:
<?php
header('Content-Type: text/html; charset=utf-8');
$doc = new DOMDocument();
$doc->load('http://www.haivl.com/rss');
$items = $doc->getElementsByTagName('item');
foreach ($items as $key => $item) {
$titles = $item->getElementsByTagName( "title" );
$title = $titles->item(0)->nodeValue;
echo $title;
}
?>
I can't get title from this url, why error, can help me fix this error !