欢迎您光临自学哈网,只为分享网络知识教程,供大家学习参考!

「自学哈网」PHP过度跳转页面代码

作者 : 自学哈 本文共2501个字,预计阅读时间需要7分钟 2022-10-8 共155人阅读
也想出现在这里? 联系我们

PHP过度跳转页面代码,大致效果如下图

新建个go.php文件 将下方的代码,复制粘贴到你新建的go.php文件中,保存(css代码我压缩了所以不用管,把https://www.11px.cn/改成自己的网站地址)

代码如下

PHP过度跳转页面代码

新建个go.php文件 将下方的代码,复制粘贴到你新建的go.php文件中,保存(css代码我压缩了所以不用管,把https://www.11px.cn/改成自己的网站地址)

代码如下

<?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='https://www.tx47.cn/';
$title='参数错误,正在返回首页...';
}
}
} else {
$title='参数缺失,正在返回首页...';
$url='https://www.11px.cn/';
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="refresh" content="5;url='<?php echo $url;?>';">
<title><?php echo $title;?></title>
<div id="circle"></div>
<div id="circletext"></div>
<div id="circle1"></div>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="refresh" content="1;url='<?php echo $url;?>';">
<title><?php echo $title;?></title>
<style>
<style type="text/css">
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}body{background:#3498db;}#loader-container{width:188px;height:188px;color:white;margin:0 auto;position:absolute;top:50%;left:50%;margin-right:-50%;transform:translate(-50%,-50%);border:5px solid #3498db;border-radius:50%;-webkit-animation:borderScale 1s infinite ease-in-out;animation:borderScale 1s infinite ease-in-out;}#loadingText{font-family:'Raleway',sans-serif;font-size:1.4em;position:absolute;top:50%;left:50%;margin-right:-50%;transform:translate(-50%,-50%);}@-webkit-keyframes borderScale{0%{border:5px solid white;}50%{border:25px solid #3498db;}100%{border:5px solid white;}}@keyframes borderScale{0%{border:5px solid white;}50%{border:25px solid #3498db;}100%{border:5px solid white;}}
</style>
</style></head>
<body>
<div id="loader-container"><p id="loadingText">页面加载中...</p></div>
</body>
</html>

调用方法

https://www.11px.cn/go.php/?url=跳转到别人的网站

本站声明:
本站所有资源来源于网络,分享目的仅供大家学习和交流!如若本站内容侵犯了原著者的合法权益,可联系邮箱976157886@qq.com进行删除。
自学哈专注于免费提供最新的分享知识、网络教程、网络技术的资源分享平台,好资源不私藏,大家一起分享!

自学哈网 » 「自学哈网」PHP过度跳转页面代码
也想出现在这里? 联系我们
© 2022 Theme by - 自学哈网 & WordPress Theme. All rights reserved 浙ICP备2022016594号