如何在PHP之前检测用户来自的网站? [英] How to detect the site a user came from before mine in PHP?

查看:58
本文介绍了如何在PHP之前检测用户来自的网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在用PHP访问我的网站之前检测用户来自的网站?

How can I detect the site the user came from before accessing mine in PHP?

推荐答案

试试这个:

$_SERVER['HTTP_REFERER']

有关详情,请参阅 HTTP推荐人


引用者或HTTP引用者 - 也就是公共拼写错误的
referer所知的
,它是作为HTTP头
字段出现的-identifies,从
视图的互联网网页或
资源,网页的地址
(通常是URL,更通用的
URI或i18n更新的IRI) )链接到它的
资源。 通过检查引荐来源
,新页面可以看到请求来自的

The referrer, or HTTP referrer—also known by the common misspelling referer that occurs as an HTTP header field—identifies, from the point of view of an internet webpage or resource, the address of the webpage (commonly the URL, the more generic URI or the i18n updated IRI) of the resource that links to it. By checking the referrer, the new page can see where the request came from.

这篇关于如何在PHP之前检测用户来自的网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆