I have a website on which I want to post the current xkcd comic. xkcd provides a link for embedding, but each link has a unique name for each comic. For example, http://imgs.xkcd.com/comics/hotels.png is today’s comic.
Is there any way to write a simple script to grab the latest comic from their website? Currently I’m just manually updating the URL on my site which is painful.
Randall provides RSS and Atom feeds for recent XKCDs. Parse one of those to get the latest comics.