Reply to Re: How to get referrer parameters?

Your name:

Reply:


Posted by Janwillem Borleffs on 10/20/37 11:41

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация