How My Links Page Works

Feb 23, 2005 9:59 AM
Tags: blogging, joegrossberg, links, php, programming, syndication

Today I got an email enquiring about my automatically-generated links page. To turn an OPML file into bulleted links, add the following to a PHP file:

<?php
include("opml_class.php");
$file = [path to your OPML file];
$blogroll = new Blogroll($file);
$output = $blogroll->html;
echo $output;
?>

I use a modified version of this PHP class.

How do I get that OPML file? I have a crontab that does: wget -q -O [path to OPML file] http://www.bloglines.com/export?id=josephgrossberg every day.

update Rasheq Rahman has a version that's less bloglines-specific, and a more easily-customized display.


Comments: How My Links Page Works

OMG. At least do this:

wget -q -O /path/to/OPML/file http://www.bloglines.com/export?id=josephgrossberg

Yow! :-)

Posted by: Dossy on February 23, 2005 11:19 AM | permalink

Joe: Thanks for providing the php mojo to turn OPML -> HTML. I've successfully followed your instructions and you can see the results at: http://wait4it.blogspot.com/

Thanks again!

Posted by: Vince on February 23, 2005 11:27 AM | permalink

Ah, didn't know about -O.

Let me guess ... you're one of those guys who never does a:

cat filename | ...

Posted by: Joe Grossberg on February 23, 2005 12:03 PM | permalink

Post a comment

Note: I reserve the right to edit or delete any comments on my website. On rare occasion, I ban a commenter.

Please keep it on-topic. Don't spam or advertise. Don't pretend to be someone else. Anonymity is OK, but less credible.

HTML tags are automatically stripped out of your comments for security reasons. If you want to put a link to something, just enter the URL. We'll figure it out.










common, yellow citrus fruit



(don't be rude)




recipes