Too much information to follow? Build your own feed generator

Editor’s Note: Today’s guest writer is Rick Martin, a Tokyo-based freelance writer. Read more from Rick at and follow him on Twitter at @1rick.


I’m not a programmer. But these days I’m starting to see how some programming skills can really make a big difference to my productivity as a writer. As I pretty much live inside my RSS readers, I find myself bouncing around between different websites copying and pasting feed links far more than I should. For example, if I want to create RSS feeds for the keyword ‘obama’, I don’t want to have to go to Google News, Yahoo News, Delicious, Flickr, Bing, Youtube and all those other services to retrieve those feeds. Try as I might, I couldn’t find any web service that would produce feeds for a given search term across multiple social media services and news sites.

This was a problem.

Solution: I decided to try to program such a tool on my own. Again I’m not a programmer, but I started with ‘Hello World’ and just researched other snippets of PHP code that I thought would do the job. I’d like to walk you through the process because if you’re new to programming this is a good way to get your feet wet.

In a nutshell, my tool would take the link structures for RSS feeds like this:

and replace the ‘keyword’ with a term that you would like to monitor using a simple string replacement command. So if you input ‘obama’, you get:

First we’ll need to whip up an index.html file to hold our input form, and a feeds.php file to display the feed results. To make these you can use your favorite text editor. Today I’m using Smultron. So lets get started!

Step 1. Create index.html and add basic html tags.

Step 2: Add a search form to index.html

This form will prompt the user to enter the keyword that they want to generate a feed for. So for example, if I want to monitor news about ‘obama’, I will enter ‘obama’ into the text input box. You can also add some explanatory text for the user just before the form if you wish. But I’ll leave that up to you. If you’d like to get an idea how this form will look in a webpage, skip ahead to the final step.

Step 3: Create the ‘feed results’ page

You might have noticed the ‘feeds.php’ reference in the form above. We’ll make that page now. So create ‘feeds.php’.

After you’ve done that, you’ll need to declare the RSS feed link structures for your favorite media services. I’m going to use Delicious, Google News, Google Blogs, Yahoo News, Bing, Twitter, Flickr, and YouTube. For each RSS link, I’ll assign a variable. So for the YouTube feed that I mentioned above, I’ll call that ‘$youtube’. So now the ‘$youtube’ variable will be representing the string of text that makes up the RSS link

Notice that I’m using REPLACEME as the keyword in all of these links, because I’m planning to substitute in the string of text that the user inputs in the text box. Simple, right?

Step 4: Replace ‘REPLACEME’ with ‘SEARCHTERM’

Now we’re going to do a simple string replacement command to replace all instances of ‘REPLACEME’ with the user-inputted text. This will generate new RSS feed links that we can then use however we choose. Note that I’m assigning a new variable to the resulted links. So our old link template, $youtube, now becomes $youtubenew, and so on down the line for all the media services.

Step 5: Get ready to display feed results

So we’ve generated the feeds we wanted. But we still haven’t displayed them yet. So let’s do that now. Add html, head, and body tags. You can add some meta info and CSS if you like as well. We’re almost done!

Step 6: Display feed results in unordered list

A simple unordered list will do to display the new generated feeds. We’re going to do a simple ‘echo’ command to print out the new feeds here. Be sure to close out your body and html tags at the end of the document.

Step 7: Test it out!

I have a working version of this tool on my website. But you can easily upload the index.html and feeds.php files to a subdirectory on your own website and use it from there.

I really prefer to use it embedded in a Netvibes page via the webpage widget (see below), because then I can generate feeds for a desired term and copy and paste the resultant feeds directly into a new Netvibes page. It’s very handy when creating media monitoring ‘dashboards’.

Taking it one step further

Ideally I’d like this tool to parse the ten most recent items for each feed generated. SimplePie might be a good solution for this, and to that end I’ve been trying to absorb this awesome tutorial from wunderkind Tom Rogers. Unfortunately the feeds aren’t quite playing nice yet, but I’ll keep working on it.

I’ve also been experimenting creating feeds for sites that don’t have any feeds. For this I’ve been generating RSS feeds using, an absolutely wonderful data scraping service. This string replacement function doesn’t always work with their links though, so your milage may vary.

Some final thoughts

I’m sure that all my code above wasn’t the most efficient or elegant, but the end result does make research a lot easier for me. If there are more seasoned programmers out there, I invite your feedback (please be gentle). For the noobs out there, I really encourage you to try adding some programming skills to your repertoire. I guarantee that you’ll start thinking about problems differently once you have a new set of tools in your box.

And if that doesn’t convince you that programming is a skill every journalist should have, check out my friend Chris who programmed his awesome Tools For News site from scratch and landed a job as a result. It’s a damn inspiring story and I’d likely not have given programming a second look if it weren’t for Chris’s fun projects.

Admittedly, programming is not the easiest thing to learn from scratch. But for those who want to give it a try, I have assembled some beginning resources on my blog that will help you learn programming from scratch. And if you have any resources that have worked well for you, I’d love to hear them.

I’m hoping to launch a local Tokyo site over the next few weeks, and this feed generator tool will certainly help out contributors who need to monitor local news their corner of Tokyo. Similarly, I hope it helps some of you readers out there as well.

NOTE: Here are the source files if you want to play around with them or install them on your own site:

You can skip to the end and leave a response. Pinging is currently not allowed.

27 Responses to “Too much information to follow? Build your own feed generator”

  1. Trevor says:

    It’s hard to find your website in google. I found
    it on 15 spot, you should build quality backlinks , it will help you to increase
    traffic. I know how to help you, just search in google – k2 seo tricks

  2. Avis says:

    I read a lot of interesting posts here. Probably you spend a lot of
    time writing, i know how to save you a lot of time, there is an online tool
    that creates unique, SEO friendly posts in minutes, just
    search in google – laranitas free content source

  3. Charlesmef says:

    Щебенка характеризуется этим, то что обладает различную конфигурацию, что находится в зависимости с его степени лещадности (область щебня). Если щебенка обладает шероховатую плоскость, некто достаточно хорошо объединяется со растворами, то что создает его необходимым во ходе изготовления бетона. Анализ свойства также типа щебня совершается со поддержкой разных характеристик, подобных равно как устойчивость, песок овражный гостомель надежность, присутствие включений, зерновой структура также полиадельфит. п. Кроме Того значимыми качествами считаются радиоактивность также морозоустойчивость. Но еще щебенка устойчив вопреки распадов также никак не включает вредоносных элементов. Более значимыми сферами использования щебня имеется дерматом основания дома также постройка путей. Наиболее этого, щебенка зачастую применяют равно как украшающий использованный материал.

  4. Autumn Yucha says:

    I simply want to tell you that I am just beginner to weblog and actually liked this page. Likely I’m likely to bookmark your site . You absolutely have tremendous article content. Many thanks for revealing your blog.

  5. ブランドコピー時計N品激安通販店
    ロレックス偽物、オメガ ブランドコピー、ブライトリング ブランドコピー
    パネライ ブランドコピー、ガガミラノ ブランドコピー、フランクミュラー ブランドコピー
    オーデマピゲ ブランドコピー、ルイヴィトンレプリカ
    シャネル 腕時計 コピー、モンクレール コピー、モンブラン 偽物
    パテックフィリップ ブランドコピーなど世界有名なブランドコピー商品が満載!

  6. if you want to protect the integrity of your heart, then low fat foods should be the thing to go`

  7. Do you believe in your past lives? Do you think is reincarnation real?

  8. Like!! Great article post.Really thank you! Really Cool.

  9. I like the valuable information you provide in your articles.

  10. I like this website very much, Its a very nice office to read and incur information.

  11. You’ve made some decent points there. I looked on the web to learn more about the issue and found most people will go along with your views on this web site.

  12. I was able to find good advice from your articles.

  13. horse thrush says:

    I blog often and I genuinely thank you for your content. Your article has truly peaked my interest. I am going to take a note of your site and keep checking for new information about once per week. I subscribed to your RSS feed as well.

  14. Pretty! This has been a really wonderful post. Thank you for providing these details.

  15. SMS says:

    These are actually great ideas in concerning blogging.

  16. Good article! We are linking to this particularly great post on our site. Keep up the great writing.

  17. I blog quite often and I genuinely thank you for your content. This article has really peaked my interest. I am going to book mark your blog and keep checking for new details about once per week. I opted in for your Feed too.

  18. Excellent article! We are linking to this particularly great content on our site. Keep up the good writing.

  19. real cheeze says:

    Pretty! This was an incredibly wonderful post. Thank you for supplying this info.

  20. The self education industry is a $355 Million per day industry and is expected to TRIPLE in the next 5 years! And with the right strategy this could be your opportunity to:

    Get in early before it is oversaturated.
    Help others go faster while you get paid
    Fix a broken system
    Make an impact on the world
    Get paid for a skill, hobby, passion or expertise you already have (or get paid from someone else’s)

    And Tony Robbins, Russell Brunson and Dean Graziosi are finally going to show YOU how to take advantage of it…

    (Now if you don’t already know who these 3 guys are then you’ll want to listen up!! They’ve impacted millions of lives and have generated billions of dollars)

    Look, if you’ve ever thought about (or even if you never thought about) getting paid for something you know (like a passion or a skill)… or even getting paid from what others know, then you have to attend.

    This is one of the fastest growing industries online and in all areas of the world.

    And for the first time ever they’re doing a webclass training on how to extract your wisdom (or somebody else’s) and get other people to pay you for it!

    You can save your spot here (and when you do register, you’re immediately going to get a brand new, never before seen training from Tony and Dean. No one else will ever get a chance to see this rare training except for us).

    After hearing what they’re teaching, I truly believe this is the #1 way to make a massive income, make a massive impact on the world and leave a legacy!

    And here’s just a fraction of what you’ll learn this week:

    The mostly hidden $129 Billion dollar market and how you can make a massive impact and leave a legacy by profiting from it.

    The KBB Triangle: The 3 ways to profit (whether you’re an expert with a thriving business, just getting started, or even if you’re at complete rock bottom)

    The framework to profit from what you (or someone else) already knows – or by creating community and bringing people together.

    Plus you’ll even be able to ask them questions when they do Q&A at the end of the training. (Chat is limited so show up early).

    There’s no other time where you’re going to have this opportunity. So BE THERE! Because if you’re not going to make a shift in your life now, then when? And if not with these guys, then let me ask with who?

    This is your rare chance to learn from 3 people who started from nothing and went on to generate billions of dollars and build massive companies.

    Spots are filling up faster than they ever have, so you need to hurry and go here to save your spot

    Register now and I’ll see you there this week – Plus they did a few brand new “pre-event” trainings that only those who register get access to.

    Talk soon

  21. Varick Street Litho , VSL Print is one of the top printing company in NYC to provide the best Digital Printing, Offset Printing and Large Format Printing in New York. Their printing services in NYC adopts state of the art digital printing services and offset digital printing for products postcards, business cards, catalogs, brochures, stickers, flyers, large format posters, banners and more for business in NYC. For more information on their digital printing nyc, visit or at 121 Varick St, New York, NY 10013, US. Or contact +1 646 843 0800

  22. JamesLet says:

    Знаете ли вы?
    Согласно мифу, Марута Сар пыталась примирить Арарат и Арагац, но не смогла.
    Консервативные художественные критики обрушились на портрет девушки, называя её гермафродитом, дочерью Каина и проституткой.
    Жизненный путь абсолютного большинства звёзд известен заранее.
    Английский крейсер ценой четырёх попаданий защитил конвой от немецкого рейдера.
    Советский разведчик-нелегал создал в Европе разведгруппу, успешно проработавшую всю войну.

  23. Hi, I do believe this is a great blog. I stumbledupon it 😉 I may come back yet again since i have book-marked it. Money and freedom is the best way to change, may you be rich and continue to help other people.

  24. This is the right blog for anybody who wishes to find out about this topic. You understand a whole lot its almost tough to argue with you (not that I personally would want to…HaHa). You certainly put a fresh spin on a subject which has been discussed for decades. Wonderful stuff, just excellent.

  25. happiness says:

    Having read this I believed it was very informative. I appreciate you taking the time and energy to put this article together. I once again find myself spending way too much time both reading and posting comments. But so what, it was still worth it!

Leave a Reply