Kwebble : Blog

  • Building a linklog with Bloglines

    Gepubliceerd op 11 december 2004 in Programming. 1 reactie

    There’s a new part on the site, a list of links or linklog that contains links to interesting items from the webfeeds I read. The list is not maintained on this site, but comes from Bloglines, which I use as my reader for webfeeds. Here’s how I did that:

    The links are stored using the blog on Bloglines that comes with an account. I activated my blog and created Kwebble’s linklog. On Bloglines you can post to the blog direct from the reading page by using the Clip/Blog This link. This makes collecting items from several webfeeds very easy.

    The next step is to get the data here on Kwebble.com. The input from Bloglines that can be used for this is the webfeed for the blog. With the freely available MagpieRSS using this webfeed is easy. MagpieRSS can retrieve the webfeed, cache it and parse it’s contents. These few lines of PHP add the items to this page:

    require_once('rss_fetch.inc');
    $rss = fetch_rss('http://www.bloglines.com/blog/kwebble/rss');
    echo '<ul>';
    foreach ($rss->items as $item) {
        preg_match('/.*?><a href="(.*?)".*?>(.*?)<.*?/', $item[description], $matches);
        echo '<li><a href="' . $matches[1] . '">' . $matches[2] . '</a></li>';
    }
    echo '</ul>';
    

    The regular expression gets the first link from each message. I could have used $item[description] directly but Bloglines adds some attributes to the link I don’t want.

    • bloglines
    • php

    1 Reactie

    1. Peter 17-12-2004 (18:11)

      Avatar

      I’ve got something very similar set up, using Bloglines+MagpieRSS:

      http://prwdot.org/?p=clipblog

      If you use Mozilla/Firefox, the Bloglines Toolkit Extension is very useful for working on your clip blog:

      http://jayseae.cxliv.org/bloglines_toolkit/index.html

      It allows you to post to your clip blog from anywhere on the web, not just inside Bloglines. You can select blocks of text and clipblog them, or click a link and clipblog it. Very handy.

  • Rubrieken

    • Artikelen
    • Foto's
    • Links
    • Media
    • Overheid
    • Programming
  • Recente Berichten

    • Stanford Web Applications course lectures
    • The importance of knowing Unicode
    • “If you are not paying for it, you’re not the customer; you’re the product being sold.”
    • Inzage in je gegevens bij Facebook
    • Tuning Oracle UCM 11 & Site Studio performance
  • Gerelateerde berichten

    • Simple Cloud API
    • Showing related articles in a WordPress blog
    • Don’t forget __isset() with overloaded setters and getters
    • PHP tip: omit ?> from PHP only files
    • MySQL STRICT_TRANS_TABLES mode and truncated text values
  • Abonneren

    • Atom feed Artikelen
    • Atom feed Reacties
  • Archief

© Rob Schlüter - Contact