While preparing a document with lots of links for both online and offline viewing, I wanted the offline (i.e. printable) version to contain fulltext hyperlinks in the footnote. So whenever LaTeX comes across a \href{http://example.org}{Example website} I want it converted to something like Example website\footnote{\url{http://example.org}}. Inspired by this answer to the related TeX.SX question I came up with

This code properly handles active characters in url's. Which is exactly what I want :).

I'm not claiming any originality here, but you might find it useful.