如何在php中检测来自其他站点的访问者 [英] how to detect visitors from other sites in php

查看:135
本文介绍了如何在php中检测来自其他站点的访问者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我目前正在开发自己的项目,这是一个与SMS网关集成的简单Web应用程序!现在我想要的是-
1.我想我的访客来自哪里?就像我在该网站上有一个Facebook页面一样.我想检测是否有用户从该Facebook页面访问我的网站.

我知道有很多服务和第三方工具可以做到这一点.但是我想知道的是,是否有我可以使用的方法id PHP,或者PHP中是否有任何接近或相关的方法.

预先谢谢您.

Hi,

I am currently working on my own project, this is a simple web application integrated with a SMS Gateway!! now I what I want is -
1. I want to where my visitors are coming from? like I have a Facebook page for that site. I want to detect if any user is visiting my site from that Facebook page.

I know there are many services and third party tools to do that. But what I want to know is that if there is any method id PHP I can use or if there any method in PHP close to that or relevant.

Thank You in advance.

推荐答案

看看document.refferer

http://www.w3schools.com/jsref/prop_doc_referrer.asp [document.refferer 放在javascript控制台中,则会向我显示指向代码项目配置文件页面的URL.
Have a look at the document.refferer

http://www.w3schools.com/jsref/prop_doc_referrer.asp[^]

For example, if I code to may CodeProject profile, click my HomePage icon, this will load up my website in the browser, if I then inspect the page with the browser debugger and put document.refferer in the javascript console, it shows me the URL to the codeproject profile page.


这篇关于如何在php中检测来自其他站点的访问者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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