I've been playing around with the tutorial on this site: http://howtostartpro...st-post-method/
But it's very outdated and the site used to teach you webrequests has been updated/changed.
Any good tutorials and a site to test this new-found knowledge with?
Any help would be greatly appreciated!
[Webrequests] Any good tutorial?
Page 1 of 14 Replies - 321 Views - Last Post: 17 August 2012 - 04:31 PM
Replies To: [Webrequests] Any good tutorial?
#2
Re: [Webrequests] Any good tutorial?
Posted 12 August 2012 - 10:40 PM
I an no expert in this area, but it looks to be quite applicable. Do you have any specific issues?
#3
Re: [Webrequests] Any good tutorial?
Posted 13 August 2012 - 03:28 AM
_HAWK_, on 12 August 2012 - 11:40 PM, said:
I an no expert in this area, but it looks to be quite applicable. Do you have any specific issues?
Any more most if not all websites with a basic form login page have you include a phpsessionid in when you go to "post" data.
To get the phpsessionid would i have to do a GET request and save the cookies i get in the same cookie i want to use for the POST request?
#4
Re: [Webrequests] Any good tutorial?
Posted 17 August 2012 - 03:05 PM
**** BOOM ****
Try this
pass in a connection string
kevin
Try this
Dim request As HttpWebRequest
Dim response As HttpWebResponse = Nothing
Dim reader As StreamReader
Dim result As String
Try
' Create the web request
request = DirectCast(WebRequest.Create(connectionString), HttpWebRequest)
'Get response
response = DirectCast(request.GetResponse(), HttpWebResponse)
' Get the response stream into a reader
reader = New StreamReader(response.GetResponseStream())
' Read the whole contents and return as a string
result = reader.ReadToEnd()
reader.Close()
Catch e As Exception
If Not response Is Nothing Then response.Close()
Return 0
End Try
response.Close()
reader.Close()
response = Nothing
request = Nothing
Return result
pass in a connection string
kevin
#5
Re: [Webrequests] Any good tutorial?
Posted 17 August 2012 - 04:31 PM
deery5000, on 17 August 2012 - 04:05 PM, said:
**** BOOM ****
Try this
pass in a connection string
kevin
Try this
Dim request As HttpWebRequest
Dim response As HttpWebResponse = Nothing
Dim reader As StreamReader
Dim result As String
Try
' Create the web request
request = DirectCast(WebRequest.Create(connectionString), HttpWebRequest)
'Get response
response = DirectCast(request.GetResponse(), HttpWebResponse)
' Get the response stream into a reader
reader = New StreamReader(response.GetResponseStream())
' Read the whole contents and return as a string
result = reader.ReadToEnd()
reader.Close()
Catch e As Exception
If Not response Is Nothing Then response.Close()
Return 0
End Try
response.Close()
reader.Close()
response = Nothing
request = Nothing
Return result
pass in a connection string
kevin
thanks but no thanks man, I'm having trouble with the phpsessionID. Plus it doesn't really show its self as a tutorial. Sorry for being blunt but thanks again.
I'd rather be handed the fishing pole and not the fish. Works 100% better in the long run.
This post has been edited by lukas76: 17 August 2012 - 04:32 PM
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote



|