phpwind注册app账号时候出现:您的密钥已经被使用!解决方法
方案如下:
1)新建PHP文件,update_code.zip
php文件内容:
<?php
require_once ('global.php');
require_once(R_P.'admin/cache.php');
$db_siteid = generatestr(32);
setConfig('db_siteid', $db_siteid);
$db_siteownerid = generatestr(32);
setConfig('db_siteownerid', $db_siteownerid);
$db_sitehash = '10'.SitStrCode(md5($db_siteid.$db_siteownerid),md5($db_siteownerid.$db_siteid));
setConfig('db_sitehash', $db_sitehash);
updatecache_c();
echo 'success';
function generatestr($len) {
mt_srand((double)microtime()*1000000);
$keychars = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWYXZ";
$maxlen = strlen($keychars)-1;
$str = '';
for ($i=0;$i<$len;$i++){
$str .= $keychars[mt_rand(0,$maxlen)];
}
return substr(md5($str.microtime().$GLOBALS['HTTP_HOST'].$GLOBALS['pwServer']["HTTP_USER_AGENT"].$GLOBALS['db_hash']),0,$len);
}
function SitStrCode($string,$key,$action='ENCODE'){
$string = $action == 'ENCODE' ? $string : base64_decode($string);
$len = strlen($key);
$code = '';
for($i=0; $i<strlen($string); $i++){
$k = $i % $len;
$code .= $string[$i] ^ $key[$k];
}
$code = $action == 'DECODE' ? $code : str_replace('=','',base64_encode($code));
return $code;
}
?>
2)解压缩后,文件上传到根目录,运行http://www.542600.com/update_code.php(您的站点地址/update_code.php)
3)后台重新注册