Host of Referer

六眼飞鱼酱① 提交于 2019-12-13 10:30:40

问题


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


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/2797704/host-of-referer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!