For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > April 2004 > Empty $HTTP_REFERER variable









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Empty $HTTP_REFERER variable
Krzysztof Piotrowski

2004-04-18, 6:31 am

Hi all,

I hale recently started using php - god fun :-D

I decided to make visits statistics.
My webpage http://www.kolumb.net/ has a statistic at
http://www.kolumb.net/mysql/list_stats.php

I hale a problem with $HTTP_REFERER variable ("Visited From" column).
Sometimes it seems empty, for no reason. Could anyone help??

Chris Columbus




J.O. Aho

2004-04-18, 6:31 am

Krzysztof Piotrowski wrote:
> Hi all,
>
> I hale recently started using php - god fun :-D
>
> I decided to make visits statistics.
> My webpage http://www.kolumb.net/ has a statistic at
> http://www.kolumb.net/mysql/list_stats.php
>
> I hale a problem with $HTTP_REFERER variable ("Visited From" column).
> Sometimes it seems empty, for no reason. Could anyone help??


From the online manual:

'HTTP_REFERER'

The address of the page (if any) which referred the user agent to the
current page. This is set by the user agent. Not all user agents will set
this, and some provide the ability to modify HTTP_REFERER as a feature. In
short, it cannot really be trusted.


Don't forget that people can start with a blank page on the browser and jump
to your page, in that case you too get a blank data.


//Aho
Krzysztof Piotrowski

2004-04-18, 6:31 am


"J.O. Aho" <user@example.net> wrote in message
news:c5thl1$4rg5o$1@ID-130698.news.uni-berlin.de...
> Krzysztof Piotrowski wrote:
>
> From the online manual:
>
> 'HTTP_REFERER'
>
> The address of the page (if any) which referred the user agent to the
> current page. This is set by the user agent. Not all user agents will set
> this, and some provide the ability to modify HTTP_REFERER as a feature. In
> short, it cannot really be trusted.
>
>
> Don't forget that people can start with a blank page on the browser and

jump
> to your page, in that case you too get a blank data.
>
>
> //Aho





Hi Aho,



Thanks for a quick answer.



I know, that sometimes people can start form a blank page and I won't get
anything in $HTTP_REFERER variable. However there are people who are
browsing through my website and I can see them jumping from one page to
another and still don't get anything in the variable. (entries 33 to 42)



> Not all user agents will set


> this, and some provide the ability to modify HTTP_REFERER as a feature.




I have realized that when you access the same page, once from real location:

http://www.kolumb.strefa.pl/mysql/list_stats.php

and once from alias:

http://www.kolumb.net/mysql/list_stats.php

in first case HTTP_REFERER is empty in second one - with info.

(At the very bottom of the page there is an output of what php can see.)

So I guess it's not only about user agent, but also about ... hmm, don't
really know what :p



Chris Columbus






Lord Merlin

2004-04-18, 7:32 am



--

Kind Regards
Rudi Ahlers
+27 (82) 926 1689

Greater love has no one than this, that he lay down his life for his friends
(John 15:13).
"Krzysztof Piotrowski" <spm@kolumb.net> wrote in message
news:c5tigt$ss0$1@inews.gazeta.pl...
:
: "J.O. Aho" <user@example.net> wrote in message
: news:c5thl1$4rg5o$1@ID-130698.news.uni-berlin.de...
: > Krzysztof Piotrowski wrote:
: > > Hi all,
: > >
: > > I hale recently started using php - god fun :-D
: > >
: > > I decided to make visits statistics.
: > > My webpage http://www.kolumb.net/ has a statistic at
: > > http://www.kolumb.net/mysql/list_stats.php
: > >
: > > I hale a problem with $HTTP_REFERER variable ("Visited From" column).
: > > Sometimes it seems empty, for no reason. Could anyone help??
: >
: > From the online manual:
: >
: > 'HTTP_REFERER'
: >
: > The address of the page (if any) which referred the user agent to
the
: > current page. This is set by the user agent. Not all user agents will
set
: > this, and some provide the ability to modify HTTP_REFERER as a feature.
In
: > short, it cannot really be trusted.
: >
: >
: > Don't forget that people can start with a blank page on the browser and
: jump
: > to your page, in that case you too get a blank data.
: >
: >
: > //Aho
:
:
:
:
: Hi Aho,
:
:
:
: Thanks for a quick answer.
:
:
:
: I know, that sometimes people can start form a blank page and I won't get
: anything in $HTTP_REFERER variable. However there are people who are
: browsing through my website and I can see them jumping from one page to
: another and still don't get anything in the variable. (entries 33 to 42)
:
:
:
: > Not all user agents will set
:
: > this, and some provide the ability to modify HTTP_REFERER as a feature.
:
:
:
: I have realized that when you access the same page, once from real
location:
:
: http://www.kolumb.strefa.pl/mysql/list_stats.php
:
: and once from alias:
:
: http://www.kolumb.net/mysql/list_stats.php
:
: in first case HTTP_REFERER is empty in second one - with info.
:
: (At the very bottom of the page there is an output of what php can see.)
:
: So I guess it's not only about user agent, but also about ... hmm, don't
: really know what :p
:
:
:
: Chris Columbus
:
:
:
:
:
:


Noah from IT Goes Click

2004-04-20, 8:30 pm

You think that PHP is god fun, try Church!

Krzysztof Piotrowski wrote:
> Hi all,
>
> I hale recently started using php - god fun :-D
>
> I decided to make visits statistics.
> My webpage http://www.kolumb.net/ has a statistic at
> http://www.kolumb.net/mysql/list_stats.php
>
> I hale a problem with $HTTP_REFERER variable ("Visited From" column).
> Sometimes it seems empty, for no reason. Could anyone help??
>
> Chris Columbus
>
>
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com