473,396 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Are They Lying: $_SERVER["HTTP_REFERER"] Question

Hi There

A client of mine has some banner ads placed on the net. Instead of relying
on the sites the ads are posted on tell us how many clicks they are
getting, we wanted to track the number ourselves.

I settled on using $_SERVER['HTTP_REFERRER'] to determine what referred the
user to our page. Sure enough, when testing, it all works (ie: i click the
ad on 'sample.com', which takes us to my page, and sure enough in our
tracking database i see 'sample.com' has had the visit count increased by
one.) I am looking for the string "sample.com" to make sure that the count
goes up whether or not the person visited sample.com via
http://www.sample.com or http://sample.com/

My question is: is $_SERVER['HTTP_REFERRER'] reliable? Essentially, a
place my clients have advertised with have said '80 people clicked your ad
this month' while our own stats show that only 15 people clicked it.

Is my method of tracking good/reliable enough to call them liars, or is my
method not too dependable?
Jul 17 '05 #1
14 2652
Good Man <he***@letsgo.com> wrote:
My question is: is $_SERVER['HTTP_REFERRER'] reliable?


Short: No

Slightly longer: with the referer you depend on the client and
all involved proxies to supply information.

Jul 17 '05 #2

"Good Man" <he***@letsgo.com> a écrit dans le message de news:
Xn***********************@216.196.97.131...
My question is: is $_SERVER['HTTP_REFERRER'] reliable?


Hi,

Of course not..
You can change it easily,( ie : in firefox, exists a plugin which you can
choose to active or not http_referrer..)
That depends on the browser..

( Sorry for my english, caus' Im French :-( )
--
http://www.danstesyeux.com

Jul 17 '05 #3
Good Man (he***@letsgo.com) decided we needed to hear...
<snip>
My question is: is $_SERVER['HTTP_REFERRER'] reliable? Essentially, a
place my clients have advertised with have said '80 people clicked your ad
this month' while our own stats show that only 15 people clicked it.

Is my method of tracking good/reliable enough to call them liars, or is my
method not too dependable?


Not really a PHP question, but anyways no, HTTP_REFERRER is not that
reliable. It *should* be filled in, but e.g. some ISP caches (such as
AOLs) block it and some personal firewalls (Norton is one IIRC) also
block it - you can configure Norton to send it to certain sites but
its off by default.
--
Dave <da**@REMOVEbundook.com>
(Remove REMOVE for email address)
Jul 17 '05 #4
Let me clarify -

Sure, the $_SERVER["HTTP_REFERRER"] can easily be changed - but don't even
try to tell me that 80% of users modify their referrer because they can -
that's just plain nonsense...

On a similar note, if 80% of web surfers are using a proxy, then I am Mickey
Mouse!

So... someone is probably taking you for a ride.

ECRIA
http://www.ecria.com

Jul 17 '05 #5
They lie.

ECRIA
http://www.ecria.com
Jul 17 '05 #6
ECRIA Public Mail Buffer ÐÉÛÅÔ:
Let me clarify -

Sure, the $_SERVER["HTTP_REFERRER"] can easily be changed - but don't even
try to tell me that 80% of users modify their referrer because they can -
that's just plain nonsense...

On a similar note, if 80% of web surfers are using a proxy, then I am Mickey
Mouse!

Hi, Mickey! :)
that for sure - in my country at least 80% using a proxy server

Living in Ukraine.
Jul 17 '05 #7
Of course, the acid test is to take the $_SERVER["HTTP_REFERRER"] out of the
equation.

Create a page that is not indexed or linked from any other sites and then
change the target of your ad to point to this page. You would probably want
to put a separate hit tracking script on this page followed by a simple
header redirect to your main page. Then, since ONLY clicks from the ad site
will result in hits on this special page, it will be very easy to determine
if their claim is exaggerated or not.

Please post your findings if you decide to do this...

ECRIA
http://www.ecria.com
Jul 17 '05 #8
BTW it's HTTP_REFERER not HTTP_REFERRER :-)

Jul 17 '05 #9
"ECRIA Public Mail Buffer" <ng***********@ecria.com> wrote in
news:d8**********@murdoch.acc.Virginia.EDU:
Of course, the acid test is to take the $_SERVER["HTTP_REFERRER"] out
of the equation.

Create a page that is not indexed or linked from any other sites and
then change the target of your ad to point to this page. You would
probably want to put a separate hit tracking script on this page
followed by a simple header redirect to your main page. Then, since
ONLY clicks from the ad site will result in hits on this special page,
it will be very easy to determine if their claim is exaggerated or
not.

Please post your findings if you decide to do this...

ECRIA
http://www.ecria.com


i'm upgrading/redoing their website this month, and indeed this is what I
will do for all of their banner advertisements. good idea, i'll let you
know what happens in the future...
Jul 17 '05 #10
Rats, you're right. This always gets me...

dictionary.com says:

1 entry found for referer.
<World-Wide Web> A misspelling of "referrer" which somehow made it into the
HTTP standard. A given web page's referer (sic) is the URL of whatever web
page contains the link that the user followed to the current page. Most
browsers pass this information as part of a request.
(1998-10-19)

ECRIA
http://www.ecria.com

"Philip Olson" <ph*********@gmail.com> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...
BTW it's HTTP_REFERER not HTTP_REFERRER :-)

Jul 17 '05 #11
Good Man (he***@letsgo.com) wrote:
: Hi There

: A client of mine has some banner ads placed on the net. Instead of relying
: on the sites the ads are posted on tell us how many clicks they are
: getting, we wanted to track the number ourselves.

: I settled on using $_SERVER['HTTP_REFERRER'] to determine what referred the
: user to our page. Sure enough, when testing, it all works (ie: i click the
: ad on 'sample.com', which takes us to my page, and sure enough in our
: tracking database i see 'sample.com' has had the visit count increased by
: one.) I am looking for the string "sample.com" to make sure that the count
: goes up whether or not the person visited sample.com via
: http://www.sample.com or http://sample.com/

: My question is: is $_SERVER['HTTP_REFERRER'] reliable? Essentially, a
: place my clients have advertised with have said '80 people clicked your ad
: this month' while our own stats show that only 15 people clicked it.

: Is my method of tracking good/reliable enough to call them liars, or is my
: method not too dependable?

In addition to what others have said, if the pages are cached anywhere
along the route (gateways and/or proxies) then you won't see all the
traffic.
--

This space not for rent.
Jul 17 '05 #12
Good Man <he***@letsgo.com> wrote:

} I settled on using $_SERVER['HTTP_REFERRER'] to determine what referred the
} user to our page. ...
}
} My question is: is $_SERVER['HTTP_REFERRER'] reliable? Essentially, a
} place my clients have advertised with have said '80 people clicked your ad
} this month' while our own stats show that only 15 people clicked it.

The short answer, as others have commented, is "no". But the longer answer
is that by and large it *IS* reliable: not very many folk know how to, or
have the facilities to, *change* the REFERER -- there are lots of
filters/firewalls/plugins, etc, that'll _block_ REFERER. so I'd say that
to first order, if you *GET* a REFERER, then it is _most_likely_ correct
[especially if you look for the specific REFERERs that you are expecting]
but you'll be left with the problem of how to sort out hits that come in
with no REFERER.

/Bernie\

--
Bernie Cosell Fantasy Farm Fibers
be****@fantasyfarm.com Pearisburg, VA
--> Too many people, too few sheep <--
Jul 17 '05 #13
A good amount of spanish connections are behind a certain ISP's massive
proxy server too.

It's a long story.

Jul 17 '05 #14
Good Man wrote:
A client of mine has some banner ads placed on the net. Instead of relying
on the sites the ads are posted on tell us how many clicks they are
getting, we wanted to track the number ourselves.


'Clicks', a marketroid's term, isn't it?

--
Jock
Jul 17 '05 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: deko | last post by:
I have a page that I don't want anyone to be able to link directly to. The page should only be accessed from gatepage.php. I tried this code, but keep getting errors - "header info already sent",...
2
by: Word Painter | last post by:
this may be more of an "html" issue, but I'll wing it. i've got a multi-language site, where the home-page of each language group features a link to a popup window that offers background info on...
10
by: Breana | last post by:
Ok i found this a while back and i am trying to mod it so it works but it keeps not updating the users online and kills my other code? Well i got it working but it dont update when i login?...
5
by: Pseudonyme | last post by:
Dear All : Ever had an httpd error_log bigger than the httpd access log ? We are using Linux-Apache-Fedora-Httpd 2006 configuration. The PHP lines code that lead too tons of errors are : ...
2
by: bips2008 | last post by:
The code seems to work fine in other browser but in IE it throws this error. This is very urgent for me and any help would be greatly appreciated For your convienence i have posted the code for the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.