in reply to Getting the URL of a referer

Rather than "do it for you", have a look at this link... then you'll be able to do it yourself.

Much more satisfying that way. ;)