I need someone to convert this code which, is a visual basic function, to a php function. It must produce an identical value as the visual basic counterpart. I can explain the process more in detail as far as the visual basic side goes.
Public Function GenRegCode(UserName As String, Password As String) As String
Dim CharNum As Long, PassChar As Long, RegCode As String, TmpStr As String, ProcessHex As String, ScrambleOrd As Long
PassChar = 1
TmpStr = ""
RegCode = ""
UserName = UCase(UserName)
Password = UCase(Password)
For CharNum = 1 To Len(UserName)
ProcessHex = Hex(Asc(Mid(UserName, CharNum, 1)) Xor Asc(Mid(Password, PassChar, 1)))
If Len(ProcessHex) Len(Password) Then PassChar = 1
Do Until Len(RegCode) = Len(TmpStr)
ScrambleOrd = ScrambleOrd + 1
RegCode = RegCode & Mid(TmpStr, ScrambleOrd * 2, 1) & Mid(TmpStr, ScrambleOrd * 2 - 1, 1)
GenRegCode = RegCode
15 freelancere byder i gennemsnit $50 på dette job
Hey, i'm coded with basic in 1997. :) its very easy to convert this function to C, Pascal, PHP, PERL.. or whatever u want:) it can be converted in minutes ;) i'll do that for 15$ but.. min. 30 :}