授权客户端代码

// 授权客户端代码
function lixiclass($authconfig) {
    error_reporting(0);
    $server = trim($_SERVER['SERVER_NAME']);
    $lixi_check = 'https://auth.liitk.com/lixiauth.php?url='.$server.'';
    $lixi_info = file_get_contents($lixi_check);
    if ($lixi_info=='y') {
    } elseif ($lixi_info=='n') {
        echo "<div style='display:block;color:#ffffff;overflow:hidden;margin-top:20%;padding:15px 15px 15px 35px;background-image:radial-gradient( circle farthest-corner at -8.9% 51.2%,rgba(255,124,0,1) 0%,rgba(255,124,0,1) 15.9%,rgba(255,163,77,1) 15.9%,rgba(255,163,77,1) 24.4%,rgba(19,30,37,1) 24.5%,rgba(19,30,37,1) 66% );'><center>当前域名 $server 暂未激活</center></div>";
        die;
    } elseif ($lixi_info=='0') {
        echo "<div style='display:block;color:#ffffff;overflow:hidden;margin-top:20%;padding:15px 15px 15px 35px;background-image:radial-gradient( circle farthest-corner at -8.9% 51.2%,rgba(255,124,0,1) 0%,rgba(255,124,0,1) 15.9%,rgba(255,163,77,1) 15.9%,rgba(255,163,77,1) 24.4%,rgba(19,30,37,1) 24.5%,rgba(19,30,37,1) 66% );'><center>检查失败了,请联系授权提供商。</center></div>";
        die;
    }
}
lixiclass($authconfig);

授权客户端代码(WordPress首页显示版)

// 授权客户端代码
function lixiclass($authconfig) {
    error_reporting(0);
    $server = trim($_SERVER['SERVER_NAME']);
    $lixi_check = 'https://auth.liitk.com/lixiauth.php?url='.$server.'';
    $lixi_info = file_get_contents($lixi_check);
    if ($lixi_info=='y') {
    } elseif ($lixi_info=='n') {
        echo "<div style='display:block;color:#ffffff;overflow:hidden;margin-top:20%;padding:15px 15px 15px 35px;background-image:radial-gradient( circle farthest-corner at -8.9% 51.2%,rgba(255,124,0,1) 0%,rgba(255,124,0,1) 15.9%,rgba(255,163,77,1) 15.9%,rgba(255,163,77,1) 24.4%,rgba(19,30,37,1) 24.5%,rgba(19,30,37,1) 66% );'><center>当前域名 $server 暂未激活</center></div>";
        die;
    } elseif ($lixi_info=='0') {
        echo "<div style='display:block;color:#ffffff;overflow:hidden;margin-top:20%;padding:15px 15px 15px 35px;background-image:radial-gradient( circle farthest-corner at -8.9% 51.2%,rgba(255,124,0,1) 0%,rgba(255,124,0,1) 15.9%,rgba(255,163,77,1) 15.9%,rgba(255,163,77,1) 24.4%,rgba(19,30,37,1) 24.5%,rgba(19,30,37,1) 66% );'><center>检查失败了,请联系授权提供商。</center></div>";
        die;
    }
}
function lixui_active_class() {
    //仅在前端显示授权
	lixiclass($authconfig);
}
add_action( 'wp_head', 'lixui_active_class', 19 );

授权服务端代码

<?php
$authurl = $_GET['url'];
$array = array(
    'liitk.com','www.liitk.com','test.liitk.com',
);
echo in_array($authurl,$array) ? 'y' : 'n';
?>

 

 

发表回复

后才能评论