PHP网站跳转链接 PHP代码



go.php

<?php
$t_url = $_GET['url'];
if(!empty($t_url)){
	preg_match('/(http|https):\/\//',$t_url,$matches);
	if($matches){
		$url   = $t_url;
		$title = '亲爱的朋友记得常来懒人源码哦...';
	}
	else
	{
		preg_match('/\./i',$t_url,$matche);
		if($matche){
			$url   = 'http://'.$t_url;
			$title = '亲爱的朋友记得常回来哦...';
		}
		else
		{
			$url   = 'http://www.domsn.com/';
			$title = '参数错误 正在返回首页~~~';
		}
	}
}
else
{
	$title = '参数缺失,正在返回首页...';
	$url   = 'http://www.domsn.com/';
}
?>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta http-equiv="refresh" content="1;url='<?php echo $url;?>';">
		<link rel="stylesheet" href="https://cndo.oss-cn-hangzhou.aliyuncs.com/master/bootstrap/css/bootstrap.min.css">
		<title>
			<?php echo $title;?>
		</title>
	</head>
	<body>
		<div class="d-flex justify-content-center">
			<div class="spinner-border text-primary" style="width: 10rem; height: 10rem;" role="status">
				<span class="sr-only">
					Loading...
				</span>
			</div>
		</div>
	</body>
</html>


签名:这个人很懒,什么也没有留下!
最新回复 (0)
返回