-1

How to find out the Referers host?

My Problem is, i wont to check, is user from google adwords or organic search... so i checking refferer, but the refferer ist allways google organix search... if some one have a be´tter idea :) tell it.

But I found out, that the HOst is a speacial one! So now I wont to check for Host of the Refferes site.

Is there a way to find out the referer is "google Adwords" ?

Fribu - Smart Solutions
  • 2,734
  • 3
  • 27
  • 60
  • Also check this: http://stackoverflow.com/questions/10613025/how-can-i-use-serverhttp-referer-to-find-that-user-came-from-google – trante Aug 20 '12 at 07:46

2 Answers2

3

Can you explain further? You want to grab the referrer? Just use

$_SERVER['HTTP_REFERER']

and then use

stristr($haystack , $needle)

to compare if they came from organic or adwords (with known values for the two)Blockquote

Pez Cuckow
  • 13,592
  • 15
  • 77
  • 127
1

Referrer data, as you've experienced, can be untrustworthy as a whole. If you're simply looking for statistical data to measure reference sources, might I suggest using Google Analytics?

http://www.google.com/analytics/

If you're trying to build logic into your PHP script based upon referrer... you might be hard pressed to find a perfect solution but here's a previous post that deals with the same topic:

Determining Referer in PHP

Community
  • 1
  • 1
gurun8
  • 3,456
  • 12
  • 35
  • 52