Success! One of my New Year’s resolutions for newspapers was for the Guardian to implement a short URL that always redirected to the latest minute by minute report – that way I could bookmark the short URL and I wouldn’t always have to go via the Guardian’s Football Minute by Minute tag page to find the page I want.
(Saving that click and page load is important as when I’m at the Emirates it’s really hard to get a connection on my mobile).
After Martin Belam had pointed me in the direction of Yahoo Pipes, which I utterly failed to get to grips with, and some relevant RSS feeds, I asked on Quora how I could do what I wanted. And Darren Levy gave me the answer – both a Yahoo Pipes method and some PHP I could implement directly:
$mylink= array();
$links = simplexml_load_file
(‘http://www.guardian.co.uk/football/football+tone/minutebyminute/rss’);foreach ($links->channel->item as $item)
{
$link = $item->link ;
$mylink = array(0=>$link);
break;
}header( “Location: “.$mylink[0] ) ;
?>
I’ve saved that code at this URL: http://www.malcolmcoles.co.uk/guardian-mbm.php. So if you bookmark that (or just click it for now), whenever you open it you’ll get automatically redirected to the latest minute by minute report from the Guardian.
I’d like to tell you how it works. Um, but I don’t really know. It obviously looks for the most recent URL and then location clearly does some sort of redirect.
Thanks to everyone involved. If you want to do something similar on a different subject (maybe cricket over by overs or the latest blogpost in a series or whatever) just replace the URL in the PHP. Here’s more on the Guardian’s tags and all the RSS feeds they can provide you with.
You might also like
- Google Instant filters put gay and lesbian on a par with rape, racism and paedophilia
- How to work out what Google Instant means for your business
- Google Instant keyboard navigation increases likelihood of clicking PPC ads
- Google autocomplete now fixes spelling problems
- Google puts the anal in analytics
Leave a comment!