|
復(fù)制代碼 代碼如下:
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' );//授權(quán)字串,把生成的字符驗證復(fù)制到這里來
if (!in_array(authorization ($authorization_key), $authorization_check)) {
die('對不起,你的程序未經(jīng)過腳本之家授權(quán)!!');
}
php技術(shù):PHP 程序授權(quán)驗證開發(fā)思路,轉(zhuǎn)載需保留來源!
鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時間聯(lián)系我們修改或刪除,多謝。