How to determine the visiting web page address in php_PHP tutorial

WBOY
Release: 2016-07-13 10:22:53
Original
925 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...
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