Re: HTTP_REFERER with javascript: document.location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Probably uses the same thing you're trying to use, which is NOT reliable.

Works for most browsers in most situations, but not reliably.

Walking through your web access logs can also sometimes use heuristics
regarding time and IP address to "guess" which users are unique or
not, but they are not really accurate.  Just guesses.

Websites that claim "# unique visitors" are either:
A) Guessing
B) Requiring a login

If it's A, and you want to compare 2 sites, and both sites aren't
using the same methodology to determine "unique visitor" your
statistics have to be taken with a huge grain of salt...

There is no magical solution out there that any log analysis website
statistic engine is using -- It's all assuming the browsers aren't
lying (and some of them are) and guesswork.

Again I say:  If you NEED to know the REFERER for sure, then YOU have
to track it.  Nobody will do it for you.

If you don't really care and just want a "guess" then you can use
REFERER.

On Tue, April 18, 2006 5:01 pm, Yudie wrote:
> Thank you for your advise.
>
> I guess it's impossible to get reliable value referrer from another
> site?
> How about the website statistic engine out there be able to get the
> referrals address'
>
>
>
> ----- Original Message -----
> From: "Richard Lynch" <ceo@xxxxxxxxx>
> To: "Yudie" <yudie@xxxxxxxxxxxxxxxxxxx>
> Cc: <php-general@xxxxxxxxxxxxx>
> Sent: Tuesday, April 18, 2006 4:16 PM
> Subject: Re:  HTTP_REFERER with javascript: document.location
>
>
>> On Tue, April 18, 2006 12:49 pm, Yudie wrote:
>> > Does anyone know how to resolve my problem
>> > I tried to get the referer url with $_SERVER['HTTP_REFERER'] but
>> > returns
>> > blank when I use javascript: document.location='...' from the
>> previous
>> > page.
>>
>> Don't do that.
>> :-)
>>
>> More specifically, no browser is required to provide HTTP_REFERER,
>> so
>> that value is completely un-reliable.
>>
>> If, for some reason, your application NEEDS the preceding page,
>> you'll
>> need to track it in the URL, or in their session, or through some
>> mechanism that YOU control.
>>
>> Rule #1:
>> Never, ever, ever, trust the browser.
>> Or the guy/gal/bot using it, for that matter.
>>
>> Hope that helps, even if it's *so* not what you wanted to hear.
>>
>> --
>> Like Music?
>> http://l-i-e.com/artists.htm
>>
>>
>>
>>
>> --
>> No virus found in this incoming message.
>> Checked by AVG Free Edition.
>> Version: 7.1.385 / Virus Database: 268.4.3/317 - Release Date:
>> 4/18/2006
>>
>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux