The following is an idea of mine. Apply the server's PHP environment configuration to the program, generate a permission string, and then write the string into the permission file code. Even if the program is moved to another server unchanged, the program cannot run. I hope everyone can discuss more...
Copy code The code is as follows:
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);//Here is the generated string verification
$authorization_check = array('dd670852938815f3892d3c511cc8fceb','ddc976cc02bce5c3c22c4d7d201c0cae' );//Authorization string, copy the generated character verification here
if (!in_array(authorization ($authorization_key), $authorization_check)) {
die('Sorry, your program is not authorized by Script Home!!');
}
http://www.bkjia.com/PHPjc/320306.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/320306.htmlTechArticleThe following is an idea of mine. Apply the server’s PHP environment configuration to the program to generate a permission string. , and then writes the string into the permitted file code. Even if the program...