Hi !
I am trying to log into my website via my vb.net application. The html code i am using on my site is very simple:
When the information is posted, check.php redirects you to 'good.html' if the username & password is valid.
I am trying to get my application to login to the website and download the html source from 'good.html'. To download the source from websites I usually use this code:
However i have no idea how to post the login information, can anybody please give me some clues on how to do it?
Thanks!
I am trying to log into my website via my vb.net application. The html code i am using on my site is very simple:
Code:
<form method="POST" action="check.php">
Username: <input name="username" type="text" size="20" value="">
Password: <input name="password" type="password" size="20" value="">
<input type="submit" value="Login"></form>
I am trying to get my application to login to the website and download the html source from 'good.html'. To download the source from websites I usually use this code:
Code:
Dim sr As IO.StreamReader
Dim wc As New Net.WebClient()
sr = New IO.StreamReader(wc.OpenRead("http://localhost/index.html"))
Dim s As String
s = sr.ReadToEnd
sr.DiscardBufferedData()
sr.Close()
wc.Dispose()
txtInfo.Text = s
Thanks!