全球主机交流论坛

标题: 全球程序员论坛,base64如何自动转换成https [打印本页]

作者: linode-jspinosi    时间: 2019-9-7 15:54
标题: 全球程序员论坛,base64如何自动转换成https
本帖最后由 linode-jspinosi 于 2019-9-7 15:59 编辑
<?php
$t=$_GET['xh_123456'];
$t=str_replace('%3D','',$t);
$t=base64_decode($t);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="white">
<style type="text/css">
body, html {
        height: 98%;
}

#playlive {
        height: 100%;
}
</style>
<script type="text/javascript" src="/js/jquery-1.9.1.min.js?r=2"></script>
</head>
<body>
        <div id="playlive"></div>
        <script>
var data ={"html":'<iframe src="<?=$t?>" width="100%" height="100%" frameborder=0  webkitallowfullscreen=&quot;&quot; mozallowfullscreen=&quot;&quot; allowfullscreen=&quot;&quot;></iframe>'};
$("#playlive").html(data.html);
</script>
</body>
</html>



<iframe src="<?=$t?>"
这里的 <?=$t?>字符是 base64_decode转化后的字段,但是转换后都是HTTP不是HTTPS,在HTTPS状态下访问不了,如何给他<?=$t?>这个结果自动转换成HTPPS

比如:平时都是转换成的结果一般都是  http://baidu.com

如何给你自动转换成 https://baidu.com 或 //baidu.com
作者: linode-jspinosi    时间: 2019-9-7 15:58
有没有大佬帮帮我
作者: 风影OvO    时间: 2019-9-7 16:01
  1. $t=$_GET['xh_123456'];
  2. $t=str_replace('%3D','',$t);
  3. $t = str_replace("http","https",base64_decode($t));
复制代码


楼主试试这样行吗  
作者: linode-jspinosi    时间: 2019-9-7 16:14
风影OvO 发表于 2019-9-7 16:01
楼主试试这样行吗

大佬牛逼,谢谢大佬。大佬万岁,祝大佬2019一路发发发!!!!!!!!!!!!!!!!!!!!
作者: 风影OvO    时间: 2019-9-7 16:23
linode-jspinosi 发表于 2019-9-7 16:14
大佬牛逼,谢谢大佬。大佬万岁,祝大佬2019一路发发发!!!!!!!!!!!!!!!!!!!! ...

没有没有 我小白一个
作者: ope087    时间: 2019-9-7 16:28
原链接如果是https的话会不会把https替换成httpss?
作者: kagurazakashira    时间: 2019-9-7 16:32
是什么驱使你有在decode前替换字符的想法....
  1. $t = str_replace('http://','https://',base64_decode($t));
复制代码

作者: linode-jspinosi    时间: 2019-9-7 16:39
kagurazakashira 发表于 2019-9-7 16:32
是什么驱使你有在decode前替换字符的想法....

因为爱情
作者: hostsloc    时间: 2019-9-7 16:46
等号得罪谁了 要被替换掉^




欢迎光临 全球主机交流论坛 (https://loc.imgfree.eu.org/) Powered by Discuz! X3.4