Home > Backend Development > PHP Tutorial > How to determine the visiting web page address in php_PHP tutorial

How to determine the visiting web page address in php_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:22:53
Original
1006 people have browsed it

How does php determine the address of the visiting web page

How does php determine the address of the visiting web page:

PHP uses the system function "HTTP_REFERER" to determine the visiting web page address

If you register as a user, you must come from a certain website

 $str=@$_SERVER[’HTTP_REFERER’];//@ is the debugging function

 if(strstr($str,www.code-123.com))//

echo "from www.code-123.com";

else

echo "Other URL";

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/845127.htmlTechArticleHow does php determine the address of the visiting web page? How does php determine the address of the visiting web page: php uses the system function HTTP_REFERER to determine the address of the visiting web page, such as When registering a user, it must be $s from a certain URL...
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template