C
Cerebrus99
I don't know if this code is very efficient, but here's a solution that has
worked for me...
---------------------------------------------------------------------
Dim PageAddress As String = "http://www.mysite.com
'Send a request to the site.
Dim myRequest As HttpWebRequest = CType(WebRequest.Create(PageAddress),
HttpWebRequest)
'Get a response from the site.
Dim myResponse As HttpWebResponse = CType(myRequest.GetResponse(),
HttpWebResponse)
'Get the data in stream format
Dim PageStream As Stream = myResponse.GetResponseStream()
Dim srPage As New StreamReader(PageStream, Encoding.UTF8)
'Read the contents using a buffer, or all at once, your preference.
Dim Contents As String = srPage.ReadToEnd()
'Extract information from the contents
MyMethod(Contents)
'Clean up
myResponse.Close()
srPage.Close()
---------------------------------------------------------------------
As far as logging into Yahoo! and Gmail accounts is concerned, that would
require authentication with a username and password. And I'm not sure how to
implement that. (If it is possible, since their servers would check for the
client)
Regards,
Cerebrus.
worked for me...
---------------------------------------------------------------------
Dim PageAddress As String = "http://www.mysite.com
'Send a request to the site.
Dim myRequest As HttpWebRequest = CType(WebRequest.Create(PageAddress),
HttpWebRequest)
'Get a response from the site.
Dim myResponse As HttpWebResponse = CType(myRequest.GetResponse(),
HttpWebResponse)
'Get the data in stream format
Dim PageStream As Stream = myResponse.GetResponseStream()
Dim srPage As New StreamReader(PageStream, Encoding.UTF8)
'Read the contents using a buffer, or all at once, your preference.
Dim Contents As String = srPage.ReadToEnd()
'Extract information from the contents
MyMethod(Contents)
'Clean up
myResponse.Close()
srPage.Close()
---------------------------------------------------------------------
As far as logging into Yahoo! and Gmail accounts is concerned, that would
require authentication with a username and password. And I'm not sure how to
implement that. (If it is possible, since their servers would check for the
client)
Regards,
Cerebrus.