Could you please help turn this script into PHPJScriptcodest1.dbank. comnetdiskjscustom-hp-one.js? V2.6.0aa I found JScriptcodensp_svc: com. dbank. signin. signinanticache: Math. floor (Math. random () * 100. could you help me convert this script into PHP?
JScript code
http://st1.dbank.com/netdisk/js/custom-hp-one.js?v=2.6.0aa
I found it.
JScript code
nsp_svc:=com.dbank.signin.signinanticache: Math.floor(Math.random() * 1000)nsp_sid: g.cookie("session"),nsp_ts: m + new Date().getTime()var u = h(w);v = g.cookie("secret") + u;nsp_key: g.md5(v).toLocaleUpperCase()
It should be these
Nsp_sid. This indicates that the session value is obtained from the COOKIE.
Others do not understand ..
The final result is as follows:
PHP code
http://api.dbank.com/rest.php?nsp_svc=com.dbank.signin.signin&anticache=135&nsp_sid=kuCoeiUua7n1NuaNghwuaPnZ.YJqLlTBkV1rM.dCSLowAv9Z&nsp_ts=1341795427238&nsp_key=74CE86E17DE7C554FCDBCACEC60C5B3F&nsp_fmt=JS&nsp_cb=_jqjsp
------ Solution --------------------
PHP is easy to use.
The official website has provided the source code.
Http://open.dbank.com/appDatabase.html? V = 2.6.2
Function signRequest ($ secret, $ param ){
$ Str = $ secret;
Ksort ($ param );
Foreach ($ param as $ k => $ v ){
$ Str. = $ k. $ v;
}
Return strtoupper (md5 ($ str ));
}
?>