Home > Backend Development > PHP Tutorial > 如可获取url中非本地域名,该怎么解决

如可获取url中非本地域名,该怎么解决

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 13:00:32
Original
998 people have browsed it

如可获取url中非本地域名
如可获取url中非本地域名,就是?to=后面的字串中的域名

http://127.0.0.1/wwwww/yuancheng.php?to=http://auction1.paipai.com/2A8B5E1F00000000002A3B1A07E07BC4

http://127.0.0.1/wwwww/yuancheng.php?to=http://www.baidu.com/2A8B5E1

http://127.0.0.1/wwwww/yuancheng.php?to=http://bbbs.sougou.com/2A8B5E111111111111111

http://127.0.0.1/wwwww/yuancheng.php?to=http://sougou.com/2A8B5E11

主要是取来做一个判断
------解决方案--------------------
print_r(pathinfo($_GET['to']));  

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
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template