Just in case anyone else was trying to set up a blogroll via, here’s what I had to do to get it to work on my Movable Type blog on my DreamHost site using PHP. Perhaps I am just thick-headed and this is all obvious to the rest of you, but I wasted too much time figuring it out (and then spent 10 more minutes writing this note to remind myself what I did). Check out the Blogrolling site if you are wondering what the heck a blogroll is and why you would want to have yours hosted on some other site.

  1. At the Blogrolling site, set up an account, create a new blogroll, and add links.
  2. In the root directory of your blog, create a file called blogroll.php with the contents

<?php //replace the value of $url with your own link from the code generator $url = ""; if($my_blogroll = @fopen("$url", "r")){ while(! feof($my_blogroll)){ $blogroll = fgets($my_blogroll, 255); echo "$blogroll"; } }else{ echo "ERROR: $url is currently inaccessible"; } ?> 3) While logged into your account at the Blogrolling site, click the link to the right that says “get code”. Scroll down to the PHP box. Copy the text (which will contain a unique ID for your blogroll) and use it to replace the similar text above in blogroll.php.
4) Include the blogroll.php file from your Movable Type Main Index template and/or other templates. For example, the code for the left column for my Main Index template looks like:


<$MTInclude file="blogroll.php"$> <$MTInclude module="Links"$> <$MTInclude module="Forums"$> <$MTInclude module="Reading"$>
[/code]5) In the root directory of your blog, create (or add to an existing one) a .htaccess file with the line: [code]AddType php-cgi .html[/code]Since Movable Type is including the PHP code in an html file, we have to tell Apache to run the html file through the PHP processor.