I think there is a HTTP_REFERRER in there that "sometimes" holds what you want. The variable isn't always set, though, and different browsers set it differently. If the user just types in the address, I don't think it's set at all.
Just something to consider.
---John Holmes...