I took a crack at converting the code from the original PHP version. There's an overflow bug in one of the functions if anyone wants to take a crack at it. Email me your results or post them here. Good Luck!
http://www.studiofx.ca/Google/GoogleCheckSum.html
|
Let us know if you (or someone else) get to a solution! |
The error occurs when you XOR it... I wrote this code in your error line to check:
dim v v = zeroFill(p4C, 13) alert cDbl(v) ' works fine p4A = p4A Xor v ' causes error
PS: I ran your code as client-side VBScript in IExplorer (alerting instead of response-writing), same problem. |
I couldn't get your code working, but instead ported the PHP version to VBScript myself. Basically the big issue is that VBScript doesn't have support for unsigned long integers. So used some unsigned arithmetic functions I got from elsewhere and the algorithm seems to work. Its a little cludgy and inefficient, I didn't do the array of characters stuff, etc. Room for improvement? Yes. But it works.
http://tumanov.com/projects/scriptlets/googlepagerankchecksum.asp |
If i replace the checksum in the google query, i access a forbidden area. Can't seem to return the required result.??anybody has a work around??? |