april2008 Posted June 8, 2009 Share Posted June 8, 2009 I am trying to get .rss working with the following url http://www.studiolounge.net/2009/03/28/php-and-curl/ but i got this error Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 5: parser error : Opening and ending tag mismatch: META line 2 and HEAD in C:\Apache2.2\htdocs\emedia\twitter_rss3.php on line 16 currently using php5.0 and apache2.2 Link to comment https://forums.phpfreaks.com/topic/161328-php-5-simplexml/ Share on other sites More sharing options...
april2008 Posted June 8, 2009 Author Share Posted June 8, 2009 anyone can help out? Link to comment https://forums.phpfreaks.com/topic/161328-php-5-simplexml/#findComment-851379 Share on other sites More sharing options...
Daniel0 Posted June 8, 2009 Share Posted June 8, 2009 anyone can help out? If nobody responds it's because nobody knows or because you phrased your question poorly. Bumping won't fix any of that. Of course it's all explained in our rules, so you already know that Link to comment https://forums.phpfreaks.com/topic/161328-php-5-simplexml/#findComment-851388 Share on other sites More sharing options...
kobmat Posted June 8, 2009 Share Posted June 8, 2009 Try to attach some code also.. maybe that will help. Link to comment https://forums.phpfreaks.com/topic/161328-php-5-simplexml/#findComment-851389 Share on other sites More sharing options...
Garethp Posted June 8, 2009 Share Posted June 8, 2009 If you want to make an rss, google "Php and RSS" not Curl Link to comment https://forums.phpfreaks.com/topic/161328-php-5-simplexml/#findComment-851390 Share on other sites More sharing options...
april2008 Posted June 8, 2009 Author Share Posted June 8, 2009 this is the code i have <? Function feedMe($feed) { // Use cURL to fetch text $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $feed); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_USERAGENT, $useragent); $rss = curl_exec($ch); curl_close($ch); // Manipulate string into object $rss = simplexml_load_string($rss); $siteTitle = $rss->channel->title; echo "<h1>".$siteTitle."</h1>"; echo "<hr />"; $cnt = count($rss->channel->item); for($i=0; $i<$cnt; $i++) { $url = $rss->channel->item[$i]->link; $title = $rss->channel->item[$i]->title; $desc = $rss->channel->item[$i]->description; echo '<h3><a href="'.$url.'">'.$title.'</a></h3>'.$desc.''; } } feedMe("http://twitter.com/statuses/user_timeline/44045750.rss"); ?> Link to comment https://forums.phpfreaks.com/topic/161328-php-5-simplexml/#findComment-851392 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.