PHP Login Via VB.Net
I'm trying to create a login thing to login through PHP with VB.Net as below, it fills out the forms on the web page with the text and logs it in, but I get no errors and it just doesn't log in, it just gives me the 'Login failed...' message I set. =/
[highlight=vb.net]
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Document.GetElementById("user").SetAtt ribute("value", (TextBox1.Text))
WebBrowser1.Document.GetElementById("passwrd").Set Attribute("value", (TextBox2.Text))
WebBrowser1.Document.GetElementById("login_btn").I nvokeMember("click")
Threading.Thread.Sleep(4000)
If WebBrowser1.Url.AbsolutePath = "(Outside Link Cannot Be Posted)" Then
MsgBox("Successfully logged in")
Me.Hide()
Loader.Show()
Else
MsgBox("Login failed...")
End If
End Sub
[/highlight]
Try WebBrowser1.Document.Body.InnerTex*****ntains("Outs ide Link Cannot Be Posted")
or something like that, instead of AbsolutePath.
Mind telling what website you're trying?
Perhaps try InnerHTML instead of InnerText.