Jump to content

http web requset loop

- - - - -

  • Please log in to reply
3 replies to this topic

#1
martin2311

martin2311

    Learning Programmer

  • Members
  • PipPipPip
  • 32 posts
guys i want to loop httpweb request for list of url in listbox


Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(i)

                Dim response As System.Net.HttpWebResponse = request.GetResponse

                Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())

                Dim source As String = sr.ReadToEnd

                TextBox1.Text = source

this is the code m using it works well for one url but when i use for each loop the project get struck

so how to get tht working smoothly?

#2
CommittedC0der

CommittedC0der

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,565 posts
Im not sure, but is this because the value of "i" never changes?
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.

#3
martin2311

martin2311

    Learning Programmer

  • Members
  • PipPipPip
  • 32 posts
well bro i=listbox.selecteditem

"i" is working fine i just want to get this code looped cause when i loop it project gets struck.

#4
martin2311

martin2311

    Learning Programmer

  • Members
  • PipPipPip
  • 32 posts
well ok bro that loop thing is solved but the new issue is that some sites get response 403 or 500 error the project gives error there i want it to keep on goin even if the response is 403 or 500 can that be done?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users