Function MakePCID() As String
Dim RANDOM_INT_RANGE As Integer
Randomize
RANDOM_INT_RANGE = Int(Rnd * 999)

MakePCID = "0" & Format(Now, "yyyymmddhhmmss") & Format(RANDOM_INT_RANGE, "000")
End Function

 

Function GetLockey() As String
Dim chfl As String: chfl = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYGabcdefghijklmnopqrstuvwxyz"
Dim chfl_len As Integer: chfl_len = Len(chfl)
Dim sr As Integer

Randomize
For i = 0 To 3
sr = Int(Rnd * chfl_len)
GetLockey = GetLockey & Mid(chfl, sr + 1, 1)
Next i
End Function

 

Function makeTicketURL(username As String, password As String) As String
WinHttp.Open "GET", "https://nsl.nate.com/client/login.do?id=" & username & "&pwd=" & password
WinHttp.Send

makeTicketURL = Split(StrConv(WinHttp.ResponseBody, vbUnicode), vbCrLf)(1)
End Function