Do you like the web comin xkcd? Have you noticed the alt and title attributes on the images that contain a sort of second punch line? Do you like to read xkcd in a browser such as Opera Mini that doesn't have an easy way to let you read the alt text?
Well, then this script is for you!
<?php header("Content-type: text/plain"); echo "Here is the contents of the XKCD Atom feed, so you can see\n" . "the ALT text in browsers that don't support it.\n"; $text = file_get_contents("http://xkcd.com/atom.xml"); $text = eregi_replace("<\?xml.*\?>\n", "", $text); $text = ereg_replace("<", "\n<", $text); $text = ereg_replace(" alt=\"", "\nalt=\"", $text); $text = ereg_replace(" title=\"", "\ntitle=\"", $text); echo $text; ?>
See it in action here: xkcd rss feed as raw text
(Bookmark it for yourself from this url if you'd like.)
It's not pretty, but it gets the job done in a handful of lines of code, so I'm satisfied.