经测试代码如下:
<?PHP
/**
* 超简单的许可系统
*
* @param
* @arrange (512.笔记) jb51.cc
**/
$fp = fopen("http://domain.com/lic.txt","r");
stream_set_timeout($fp,10);
$license = fread($fp,filesize($filename));
fclose($fp);
if ($license == "1234567") {
echo "Your license key is valid";
} else {
die("Invalid license key");
}
/*** 来自:编程之家 jb51.cc(jb51.cc) ***/
?>