Jonathan Wiltshire wrote:
That wasn't the question, rather collecting the get string from the
referrer. However I believe PHP trims the referrer to show only the
URI, not the whole request string. If you have access to log files
you could use these to parse out the referrers, but that's only
really helpful *after* the event, because the server will probably
lock them until they are next rotated.
When the link to the PHP script is called from a page which itself is called
with a query string and the link is clicked, the $_SERVER['HTTP_REFERER']
variable will contain the full URL, including the query string of the
originating page.
However, this is not the query string sent to the PHP script. So, when the
page containing the link is called with
http://domain/?a=b and the link is
clicked sending the query string "foo=bar", the called PHP script will
receive
http://domain/?a=b as the referrer (stored in the
$_SERVER['HTTP_REFERER'] variable) and the query string "foo=bar" will be
stored in $_GET, $_REQUEST or $_SERVER['QUERY_STRING'] as usual.
JW