检测访客来源(facebook、yahoo、google)等 [英] Detect visitors origin (facebook,yahoo,google) etc
问题描述
我正在使用 jahrain 的单点登录解决方案.基本上,我想检测来自(facebook、yahoo、google、myspace、live/hotmail、openid)域的用户.然后如果没有登录.重定向到为这些访问者设计的网页.我正在使用 php.
Im using single sign on solutions from jahrain. basically, i want to detect users coming from (facebook, yahoo, google, myspace, live/hotmail, openid) domains. then if not logged in. redirect to a webpage intended for these visitors. im using php.
推荐答案
虽然这不是万无一失的,但通常的方法是检查 $_SERVER['HTTP_REFERER']
环境变量,通常由浏览器作为标题发送.
While this is not foolproof, a common way to do this is by examining the $_SERVER['HTTP_REFERER']
environment variable, which is generally sent by the browser as a header.
也就是说,请注意此线程中的内容:在 PHP 中确定 Referer
That said, note the things from this thread: Determining Referer in PHP
这篇关于检测访客来源(facebook、yahoo、google)等的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!