Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   random rss feed generator? (https://www.warriorforum.com/programming/775409-random-rss-feed-generator.html)

cpa-money 6th April 2013 02:51 AM

random rss feed generator?
 
hello,

i need a random rss feed, so every time that i will refresh the rss url i will get a new quote or saying (maybe from a simple database - txt file or excel file).

is there any way i can do it without too much programming?

alternatively, is there any free wordpress plugin that can post randomly within few minutes interval from a pre-made posts or database?

thanks!

Diversion52 6th April 2013 06:04 AM

Re: random rss feed generator?
 
So when anybody refreshes the RSS there will be a new quote added to the feed? As in everyone subscribing to the feed will get that new quote? That doesn't really make sense to me.

Can you explain what it is that you're trying to accomplish?

cpa-money 6th April 2013 10:26 AM

Re: random rss feed generator?
 
Quote:

Originally Posted by Diversion52 (Post 7941725)
So when anybody refreshes the RSS there will be a new quote added to the feed? As in everyone subscribing to the feed will get that new quote? That doesn't really make sense to me.

Can you explain what it is that you're trying to accomplish?

yes a new quote will be added to the feed (the feed will have only one quote at a time so the last one will be delete).

nobody need to subscribe to this feed, i just need to syndicate it to my chain of blogs every few minutes as a new post.

Diversion52 6th April 2013 04:10 PM

Re: random rss feed generator?
 
Here's something to get started. Check this article out for creating a RSS feed with PHP Create an RSS feed with PHP - Carron Media

Instead of just going through the tables and listing them out, you can query the table and randomly select on of them to display. You can actually randomize it while querying the database with something like
Code:

SELECT * FROM mytable ORDER BY rand() LIMIT 1
But that should only be used for small databases (about 100 rows). If you're going to use a bigger database, use PHP to randomize a number to select the random row.

lordspace 6th April 2013 10:43 PM

Re: random rss feed generator?
 
Hi,

Actually, you can take a look at default WordPress installation. There is a plugin called "Hello Dolly" which outputs random text. Maybe you use that as a starting point.

WordPress › Support ยป Feed for Custom Post Types


All times are GMT -6. The time now is 01:08 PM.