时间:2021-07-01 10:21:17 帮助过:27人阅读
function authorization($seed = '') {
$encode = $_SERVER['SERVER_SOFTWARE'] . $_SERVER['SERVER_NAME'] . $_SERVER['DOCUMENT_ROOT'] .
$_SERVER['SERVER_ADMIN'] . $_SERVER['SERVER_ADDR'] . PHP_VERSION . PHP_OS . __FILE__;
return md5 ($encode);
}
$authorization_key = 'jb51.net';
echo authorization($authorization_key);//这里是生成字符串验证
$authorization_check = array('dd670852938815f3892d3c511cc8fceb','ddc976cc02bce5c3c22c4d7d201c0cae' );//授权字串,把生成的字符验证复制到这里来
if (!in_array(authorization ($authorization_key), $authorization_check)) {
die('对不起,你的程序未经过脚本之家授权!!');
}