Are there any HTTP Headers I could use to grab the entire referrer URL using a webserver/server-side scripting? Including query string, et cetera?
You should be able to grab it from the $_SERVER['HTTP_REFERER'] variable.