Home > Backend Development > PHP Tutorial > 请教怎么获取用户的来源

请教怎么获取用户的来源

WBOY
Release: 2016-06-13 10:10:42
Original
921 people have browsed it

请问如何获取用户的来源?
我想知道用户在打开某个网址前一个网址,比如你先访问 a.com 然后再到 b.com,要想知道在b.com上知道你是从 a.com来的,并在url中以from=a.com的形式显示出来, 请问这个信息怎么获得呢?

------解决方案--------------------
$_SERVER[“HTTP_REFERER”]
------解决方案--------------------
只有通过点击通过js.flash.直接打开 等等方式过来的是无法获取的
------解决方案--------------------
定义唯一标识,传递唯一标识。
------解决方案--------------------

探讨
$_SERVER[“HTTP_REFERER”]

------解决方案--------------------
PHP code
$_SERVER[“HTTP_REFERER”]<div class="clear">
                 
              
              
        
            </div>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template