Could you help me change this short piece of code to ASP? thank you!
Function flashdata_decode ($ s) {$ r = ''; $ l = strlen ($ s); for ($ I = 0; $ I <$ l; $ I = $ I + 2) {$ k1 = ord ($ s [$ I])-48; $ k1-= $ k1> 9? 7: 0; $ k2 = ord ($ s [$ I + 1])-48; $ k2-= $ k2> 9? 7: 0; $ r. = chr ($ k1 <4 | $ k2);} return $ r ;}
I am not familiar with PHP, so I cannot do it. thank you!
Mainly $ r. = chr ($ k1 <4 | $ k2); this line does not know how to change
Reply to discussion (solution)
PHP strlen function
ASP len functions
PHP ord functions
ASP asc functions
PHP | operator
ASP or operator
PHP <right shift operator
ASP is not replaced by concatenation 2. For example, <4 is * 2*2.
PHP $ s [$ I]
ASP mid (s, I, 1)
Thank you very much. those have already been translated. However, the chr of PHP is different from the chr/chrw of ASP. is ASP converted? What should I do?