Home > Backend Development > PHP Tutorial > 怎么从url中获取一个网址,然后跳转到这个网址去

怎么从url中获取一个网址,然后跳转到这个网址去

WBOY
Release: 2016-06-13 10:10:33
Original
1126 people have browsed it

如何从url中获取一个网址,然后跳转到这个网址去
比如有一个url,形式为http://www.abcd.org/go.php?&from=source&go=www.xyz.edu.cn,如何在访问这个url时跳转到go参数所代表的网址?

------解决方案--------------------
header("location:".$_GET['go']);
------解决方案--------------------

PHP code
$go='http://'.$_GET['go'];echo "<script language="javascript" type="text/javascript">";  echo "window.location.href='$go'";  echo "</script>";<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