JS代码转成PHP代码

sb13btfurygz sb13btfurygz 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<script type="text/javascript">
function rightSide(playerID) {
this.Decrypt2 = function(data) {
var b = (7 * (data - 6) % 10 + 10) % 10;
return b.toString();
alert(b.toString());
}

this.Decrypt = function(playerID) {
playerID = playerID.toString();
var arrID = new Array();
for (var i = 0; i < playerID.length; i = i + 1) {
var a = playerID.substr(i, 1);

switch (a) {
case "0": arrID.push(this.Decrypt2(0)); break;
case "4": arrID.push(this.Decrypt2(1)); break;
case "5": arrID.push(this.Decrypt2(2)); break;
case "3": arrID.push(this.Decrypt2(3)); break;
case "6": arrID.push(this.Decrypt2(4)); break;
case "9": arrID.push(this.Decrypt2(5)); break;
case "7": arrID.push(this.Decrypt2(6)); break;
case "1": arrID.push(this.Decrypt2(7)); break;
case "2": arrID.push(this.Decrypt2(8)); break;
case "8": arrID.push(this.Decrypt2(9)); break;
}
}
return arrID.join('');
}
return this.Decrypt(playerID);
}
var idArr = rightSide(5705);


以上JS代码,帮忙转成PHP代码,谢谢各位了!!!
...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
sb13btfurygz
基础编程 21,889 成员 140,329 内容