hi i am trying to display videos from an rss feed , every thing was working fine then atonce every thing stopped working and i started receiving error
[code=error]
Warning: DOMDocument::lo ad() [domdocument.loa d]: Start tag expected, '<' not found in http://www.paksiasat.c om/feed/, line: 1 in M:\xamp2\xampp\ htdocs\entertai nment\home.php on line 6
[/code]
my code is as follows
[code=php]
$doc = new DOMDocument();
//$doc_thumb = new DOMDocument();
$doc->load("http://www.paksiasat.c om/feed/");
//$doc_thumb->load("http://www.paksiasat.c om/feed/");
?> <!-- content -->
<div class="subfeatu res">
<div class="subfeatu res-inner">
<ul>
<?php
foreach($doc->getElementsByT agName('item') as $node){
$rss = array (
'title' => $node->getElementsByT agName('title')->item($counte r)->nodeValue,
'description' => $node->getElementsByT agName('descrip tion')->item($counte r)->nodeValue,
'link' => $node->getElementsByT agName('link')->item($counte r)->nodeValue,
'date' => $node->getElementsByT agName('pubDate ')->item($counte r)->nodeValue,
'comments' => $node->getElementsByT agName('comment s')->item($counte r)->nodeValue,
'content' => $node->getElementsByT agName('encoded ')->item($counte r)->nodeValue,
'guid' => $node->getElementsByT agName('guid')->item($counte r)->nodeValue
);
echo '
<li class="subfeatu re">
<a href="'.$rss['guid'].'" title="'.$rss['title'].'" class="" style="">
<img src="http://localhost:8080/wordpress/wp-content/themes/wave/thumb.php?src=/wp-content/themes/wave/images/placeholder-subfeature.jpg& amp;w=158&h =116&zc=1&a mp;q=95" alt="'.$rss['title'].'">
<span> '.$ rss['title'].'</span>
</a></li>
';
}
?>
</ul>
</div>
</div>
[/code]
[code=error]
Warning: DOMDocument::lo ad() [domdocument.loa d]: Start tag expected, '<' not found in http://www.paksiasat.c om/feed/, line: 1 in M:\xamp2\xampp\ htdocs\entertai nment\home.php on line 6
[/code]
my code is as follows
[code=php]
$doc = new DOMDocument();
//$doc_thumb = new DOMDocument();
$doc->load("http://www.paksiasat.c om/feed/");
//$doc_thumb->load("http://www.paksiasat.c om/feed/");
?> <!-- content -->
<div class="subfeatu res">
<div class="subfeatu res-inner">
<ul>
<?php
foreach($doc->getElementsByT agName('item') as $node){
$rss = array (
'title' => $node->getElementsByT agName('title')->item($counte r)->nodeValue,
'description' => $node->getElementsByT agName('descrip tion')->item($counte r)->nodeValue,
'link' => $node->getElementsByT agName('link')->item($counte r)->nodeValue,
'date' => $node->getElementsByT agName('pubDate ')->item($counte r)->nodeValue,
'comments' => $node->getElementsByT agName('comment s')->item($counte r)->nodeValue,
'content' => $node->getElementsByT agName('encoded ')->item($counte r)->nodeValue,
'guid' => $node->getElementsByT agName('guid')->item($counte r)->nodeValue
);
echo '
<li class="subfeatu re">
<a href="'.$rss['guid'].'" title="'.$rss['title'].'" class="" style="">
<img src="http://localhost:8080/wordpress/wp-content/themes/wave/thumb.php?src=/wp-content/themes/wave/images/placeholder-subfeature.jpg& amp;w=158&h =116&zc=1&a mp;q=95" alt="'.$rss['title'].'">
<span> '.$ rss['title'].'</span>
</a></li>
';
}
?>
</ul>
</div>
</div>
[/code]
Comment