My BrightonBloggers site offers an aggregated display of the most recent 50 posts spotted. It uses some php to consume an RSS file which is produced via some yahoo pipes manipulation which takes the OPML file and retrieves RSS from each listed site. Someone reported an error with this yesterday, and after a bit of research it turned out that the yahoo pipes part was timing out. My best guess was that one, or more, of the feeds listed in the OPML file were dead. A quick hunt around google failed to find me anything to do a dead link check from an OPML file, so I quickly cobbled a partial solution - a PHP script to get the RSS links and output to HTML, and then I made use of the firefox add-on LinkChecker to determine which were live or not.

A sample line from my BrightonBloggers OPML file is:


<outline type="rss" text="Jane Dallaway" htmlUrl="" title="Jane Dallaway" xmlUrl=""/>

and the php I'm using to consume it and work with it is

$file = "";



foreach ($lines as $line_num => $line


// skip those that don't begin with <outline type="rss"

if (stristr($line,"<outline type="rss"") != FALSE)


// find xmlUrl=" and get content between start and end " 

$checkFor = "xmlUrl="";

$starter = stripos($line, $checkFor);

if ($starter > 0)


$starter = $starter + strlen($checkFor);


$end = stripos($line,""",$starter);

$xmlurl = substr($line,$starter,$end - $starter); 

//output the link, as a link

    echo "<a href="".$xmlurl."">".$xmlurl."</a><br /> ";



After running the dead link checker through firefox, and then pruning or fixing dead links, the aggregated feed is working again