How to get the redirect source in PHP?

WBOY
Release: 2016-10-22 00:14:10
Original
1630 people have browsed it

How to get the redirect source in PHP?
For example, www.a.com redirects to www.b.com through header location. How does www.b.com obtain the redirection source to determine whether this visit is redirected from www.a.com?

Reply content:

How to get the redirect source in PHP?
For example, www.a.com redirects to www.b.com through header location. How does www.b.com obtain the redirection source to determine whether this visit is redirected from www.a.com?

Can php get referer from header?

js has this referer, which is the access source. The author can search it on Baidu, and then you can use this

Try to get it via $_SERVER['HTTP_REFERER']

The answer is that it cannot be obtained.

Related labels:
php
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!