Easier method is using HttpWebRequest.
Make a new module and put in
Code:
Imports System.Security.Cryptography
Imports System.Text
Module Module1
Public Function Login(ByVal Username As String, ByVal Password As String)
Password = MD5(Password)
Dim valid As Boolean = False
Dim data As String = "vb_login_username=" & Username & "&vb_login_password=&s=&do=login&vb_login_md5password=" & Password & "&vb_login_md5password_utf=" & Password
Try
Dim request As HttpWebRequest = WebRequest.Create("example.dotcom/login.php?do=login")
request.Method = WebRequestMethods.Http.Post
reques*****ntentType = "application/x-www-form-urlencoded"
request.UserAgent = "-- vBulletin Vaidation --"
reques*****ntentLength = data.Length
Dim rStream As New StreamWriter(request.GetRequestStream)
rStream.Write(data)
rStream.Flush()
rStream.Close()
Dim response As HttpWebResponse = request.GetResponse
Dim resReader As New StreamReader(response.GetResponseStream)
Dim str As String = resReader.ReadToEnd
If str.Contains("Successful Login!") Then
valid = True
Else
valid = False
End If
response.Close()
Catch ex As Exception
MessageBox.Show(ex.Message, "Error URFORUMNAME Forums-Login!", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Return valid
End Function
Public Function MD5(ByVal number As String) As String
Dim ASCIIenc As New ASCIIEncoding
Dim strReturn As String = String.Empty
Dim ByteSourceText() As Byte = ASCIIenc.GetBytes(number)
Dim Md5Hash As New MD5CryptoServiceProvider
Dim ByteHash() As Byte = Md5Hash.ComputeHash(ByteSourceText)
For Each b As Byte In ByteHash
strReturn &= b.ToString("x2")
Next
Return strReturn
End Function
End Module
put your url to the login.php page where it says example.dotcom/login.php?do=login
Code:
Dim request As HttpWebRequest = WebRequest.Create("example.dotcom/login.php?do=login")
For the login button put in
Code:
If Login(ComboBox1.Text, TextBox1.Text) Then
MsgBox("Successfully Logged In! WELCOME!")
Form2.Show()
Me.Close()
Else
MsgBox("Incorrect Username/Password")
End If
there ya go its secure, and its easier. uses only the vbulletin useraccounts