URL jump code
1. Code:
$url=$_GET["url"];header("Location:"."http://".$url);?> Such as Save it as aaa.php, you can achieve the effect of aaa.php?url=www.baidu.com jumping to Baidu.
This simply calls the default $_GET variable. And php default jump Location:
2. Instance upgrade: add if loop
code:
Copy code The code is as follows:
< ?
$url=$_GET["url"];
if (strlen($url >=3)){
header("Location:"."http://".$url );
}
?>
URL redirect page
http://www.bkjia.com/PHPjc/323632.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/323632.htmlTechArticleURL jump code 1. Code: ? $url=$_GET["url"];header("Location :"."http://".$url);? If saved as aaa.php, you can achieve the effect of aaa.php?url=www.baidu.com jumping to Baidu. This simple adjustment...
Statement: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