how to make take feed from two sources? i get this error what i did was changd the url of feed location and copy pasted the full code twice...
The random script is not working for me--no error message or anything. I use LastRSS and it works ok, no random though
I am still using yfs1's cool script - have been for about a year now I expect. Excellent. I have one question. Is it possible, or would it be possible to have the script work a little like adsense does and produce on topic feeds for the page or pages in question? That would be pretty cool.
thank you for sharing. what the rotating feed means? does it rotate feed? I could only add one feed though. today I did try it again after previous attempt, and got it to work, I assume this script can only be used with one feed, I tried it with 2 feeds, did not work. anyone using it with more than one feed? thanks
Hi Jez, I'm not sure if this is what you're looking for, but Allfeeds.com (http://publisher.allfeeds.com) has an XML Feeds program that can serve on-topic advertiser feeds to your web pages. It's not exactly the same as an rss news feed, but I thought it may be something of interest to you. I've had good results with their programs as an affiliate publisher. HTH, Sam
Recently my yahoo rss feeds could not fetch the pictures and when i click on it it goes to a 404 page. :S
Dear readers, I am trying to use the "straight" version of this script. It works fine with a single RSS feed however when i try to add multiple feeds i get this error: You can view my site @ http://server11.web-mania.com/users/crkdeign/rss.php Thanks in advance. Michael
You can only use one feed with the Straight code...You need to go with the rotating if you want multiple.
Will the rotating code allow me to display two different feeds at the same time? In different parts of the page?
hmm do you know of any scripts that will allow me to provide two feeds? Or could i include the feeds separetly using php include function?
Yes, CaRP is probably the best one out there. I created the code in this thread nearly 2 years ago when there were very few options (or the options that were out there had complex explanations) I am using CaRP here: http://www.hapahapa.com/latest-news.htm It is extremly adaptable and can be very easily changed as far as layout. If you want to try it and post any questions here. To be honest I'm more comfortable helping people with that code then the ones in this thread as its been years at this point
I'm having trouble finding the config options to do the following in CaRP: Remove the <br />'s after every line Remove where the feed is from and the description of the feed Making the link target in _blank and adding rel="nofollow" to the link Here's what I have so far: CarpConf('maxitems',10); CarpConf('iorder','link'); CarpConf('bi',' <li>'); CarpConf('ai','</li>'); CarpConf('poweredby',''); Basically I just need it to show up like this: <li><a href="" target="_blank" rel="nofollow">Hi</a></li>
Hello, I'm a bit late on this thread, hope some of you are still around. I am having trouble getting ssi include command to work on my main page. It works on my other pages just fine any suggestions? Also, anyone know how to make magpie include rss images? I have the news feeds working just fine. Thanks Jen-
I made modifications to the ORIGINAL script posted at the beginning of this page to use echo instead of printf and to use cURL instead of fopen for those hosts that don't allow fopen to remote servers such as dreamhost. I inserted the google news feed URL and it works great: http://www.outblogger.com/demo/dp_rss.php Here ya go: <?php $insideitem = false; $tag = ""; $title = ""; $description = ""; $link = ""; $locations = array('http://news.google.com/?ned=us&topic=s&output=rss', 'http://news.google.com/?ned=us&topic=s&output=rss', 'http://news.google.com/?ned=us&topic=s&output=rss'); srand((float) microtime() * 10000000); // seed the random gen $random_key = array_rand($locations); function startElement($parser, $name, $attrs) { global $insideitem, $tag, $title, $description, $link; if ($insideitem) { $tag = $name; } elseif ($name == "ITEM") { $insideitem = true; } } function endElement($parser, $name) { global $insideitem, $tag, $title, $description, $link; if ($name == "ITEM") { echo "<dt><b><a href='" . trim($link) . "' target='new'>" . trim($title) . "</a></b></dt>\n"; echo "<dt>" . trim($description) . "</dt><br><br>\n"; //printf("<dt><b><a href='%s' target=new>%s</a></b></dt>",trim($link),htmlspecialchars(trim($title))); //printf("<dt>%s</dt><br><br>",htmlspecialchars(trim($description))); $title = ""; $description = ""; $link = ""; $insideitem = false; } } function characterData($parser, $data) { global $insideitem, $tag, $title, $description, $link; if ($insideitem) { switch ($tag) { case "TITLE": $title .= $data; break; case "DESCRIPTION": $description .= $data; break; case "LINK": $link .= $data; break; } } } $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "startElement", "endElement"); xml_set_character_data_handler($xml_parser, "characterData"); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $locations[$random_key]); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $data = curl_exec($ch); curl_close($ch); //$fp = fopen($locations[$random_key], 'r') or die("Error reading RSS data."); // while ($data = fread($fp, 4096)) xml_parse($xml_parser, $data) or die(sprintf("XML error: %s at line %d", xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser))); //fclose($fp); xml_parser_free($xml_parser); ?> Code (markup): Hope you find this useful, thanks!
CarpConf('biurl','<a target="_blank" rel="nofollow" href="'); CarpConf('aiurl','">'); CarpConf('ailink','</a>'); dont know about the others.