php代码|给网站源码加个远程授权

时间:4个月前   阅读:114

这是一个网上找到的域名授权代码,挺方便的。

原版授权前台代码:

<?php
    //获取不带端口号的域名前缀
    $servername = trim($_SERVER['SERVER_NAME']);
    //获取服务端授权文件校验
    $verifyurl = file_get_contents('http://ymsq.hpjyfuzhu.cn/?domain='.$servername);
    if(!empty($verifyurl)){
        echo "已授权";    //授权成功
    }else{
        die("未授权!");    //授权失败
    }
?>


原版授权后台代码:

<?php
//获取域名
$domain = $_GET['domain'];
//授权域名列表
$Array = array('127.0.0.1','qza.caihongfaka.cn');
//校验结果
echo in_array($domain, $Array) ? 'yes' : '';
?>


下面是个人完善,前台代码美化。


完善后的授权前台代码:

<?php

    $servername = trim($_SERVER['SERVER_NAME']);

$verifyurl = file_get_contents('http://ymsq.zshao.vip:88/?domain='.$servername);

    if(!empty($verifyurl)){

  //删除这个添加其他 授权后启动的代码echo "已授权"; 

    }else{

        echo ' <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes" /><link rel="stylesheet" href="http://wj.hpjyfuzhu.cn/css/layui.css" media="all"></head><style>html{background-color: #fff}</style><body><div class="layui-container" style="max-width: 700px"><div style="padding: 5px"><div class="layui-card" style="box-shadow: 0 1px 20px 5px rgba(0,0,0,.05);"><div class="layui-card-header" style="text-align: center">操作提示</div><div class="layui-card-body"><p style="font-size: 20px;margin-top: 10px;margin-bottom: 10px;color: red;text-align: center;">【域名还未获得授权】<br></p></div><div style="text-align: center;padding: 10px"><a class="layui-btn layui-btn-sm" href="http://zy.zshao.vip:88/jishuyuan.html " >授权方案</a></div></div></div></div></body>';//这里加没授权显示的代码

exit(); 

    }

?>


下面这个是一个美化代码

 <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=2.0, user-scalable=yes" /><link rel="stylesheet" href="http://wj.hpjyfuzhu.cn/css/layui.css" media="all"></head><style>html{background-color: #fff}</style><body><div class="layui-container" style="max-width: 700px"><div style="padding: 5px"><div class="layui-card" style="box-shadow: 0 1px 20px 5px rgba(0,0,0,.05);"><div class="layui-card-header" style="text-align: center">操作提示</div><div class="layui-card-body"><p style="font-size: 20px;margin-top: 10px;margin-bottom: 10px;color: red;text-align: center;">域名未授权!!<br><br>【<a href="http://wj.hpjyfuzhu.cn/qq/" target="_blank">点此QQ购买授权</a>】<br><br>【<a href="http://wj.hpjyfuzhu.cn/wx/" target="_blank">点此微信购买授权</a>】<br></p></div><div style="text-align: center;padding: 10px"><a class="layui-btn layui-btn-sm" href=" javascript:history.go(-1); " > 返回上一页</a></div></div></div></div></body>

 

 

 加密后的代码

 define('QuWqes0112',__FILE__);$jREiOz=urldecode("%6E1%7A%62%2F%6D%615%5C%76%740%6928%2D%70%78%75%71%79%2A6%6C%72%6B%64%679%5F%65%68%63%73%77%6F4%2B%6637%6A");$VHRLLe=$jREiOz[3].$jREiOz[6].$jREiOz[33].$jREiOz[30];$juiuSc=$jREiOz[33].$jREiOz[10].$jREiOz[24].$jREiOz[10].$jREiOz[24];$LnWKHS=$juiuSc[0].$jREiOz[18].$jREiOz[3].$juiuSc[0].$juiuSc[1].$jREiOz[24];$kPnUnl=$jREiOz[7].$jREiOz[13];$VHRLLe.=$jREiOz[22].$jREiOz[36].$jREiOz[29].$jREiOz[26].$jREiOz[30].$jREiOz[32].$jREiOz[35].$jREiOz[26].$jREiOz[30];eval($VHRLLe("JGxFUmFzcT0iZHhRWFVIcG1pV3phbHFialBLZkduQlRJT3lSRUpWdHJGQ0xOY3drTWdEZW9odlNzQXVaWUh5RGhNbWZZU3VST0NqaVpHRmFiVGVua1B3V3J0TGRJcG9LQXNnRXpCdnhxbFhKVVZjTlFHdjlnT21WQk5iTFlPdTVDRm9IZUQxdFpPTU1nem5yd3R3eVdITEh5Tmh6Z3pucndGblVFRDN0M09tSG5HaEx3aWJXQ1EyOUVOSkJTdG5OcHpKTTNESk0yelNNd1dTTTJXb00yem5NQ0FNekNBUlFDQVJEZ3RuUTV6WkJDek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bldLSFMoJGxFUmFzcSwwLCRrUG5VbmwpKSkpOw=="));


上一篇:完整代码|利用JS显示时间日期

下一篇:js代码|每秒自动增加数量

网友评论