上次访问的链接
我在第二个域名上有 2 个域名,我想检查上次访问的链接。
例如。当用户点击第一个域名上的“联系我们”链接时,会将其带到第二个域名。现在我怎么知道哪个链接被点击了。
I have 2 domain names on second domain name I want to check last visited link.
for eg. on 1st domain name contact us link is given when user click on it, it takes him to second domain name. now how will I know which link is clicked.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以检查 HTTP REFERER 标头。在 PHP 中,您可以在 $_SERVER['HTTP_REFERER'] 中找到它,但由于它是由用户代理(浏览器)设置的,因此您不能真正信任它来处理任何重要的事情。
http://www.php.net/manual/en/reserved.variables .server.php
You can check the HTTP REFERER header. In PHP you can find it in
$_SERVER['HTTP_REFERER']
but as it is set by the user agent (the browser), you cannot really trust it for anything important.http://www.php.net/manual/en/reserved.variables.server.php
您的意思是您只是想知道人们来自哪个 URL?查看 Referrer 标头。但请注意,这很容易被伪造,因此不要依赖它来确保安全。
http://en.wikipedia.org/wiki/HTTP_referrer
Do you mean you simply want to know which URL people came from? Look at the Referrer header. But be aware this can be easily faked, so do not rely on it for security.
http://en.wikipedia.org/wiki/HTTP_referrer