views:

69

answers:

2

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" ?

A: 

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:

http://stackoverflow.com/questions/165975/determining-referer-in-php

gurun8
I wont to work with this on my Page. So If user is from Adwords to this, if organic search do this...
Fincha
+1  A: 

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
what is $needle of google Adwords?
Fincha