Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. http Response

http Response

Scheduled Pinned Locked Moved Visual Basic
csharpdotnetcomhelptutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    ybasha
    wrote on last edited by
    #1

    can any one tell how to pass the 2 url in a funcion say i have a function which check the url is valid r not thro http respnse if i give 2 url together i need my application to check the url 1 by 1 this is the code snippet Public Function checkurl(ByVal url As String) As String Dim req As System.Net.HttpWebRequest Dim res As System.Net.HttpWebResponse Dim r As System.IO.StreamReader Dim ex As Exception 'error exeption holder Dim pge As String 'page holder Dim title As String Dim strreturnstring As String url = "http://www.yahoo.com" ' i need to pass 2 url like "http://www.sg/" and "http://www.yahoo.com/" Try 'display request url req = req.Create(url) req.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)" req.AllowAutoRedirect = True 'get page res = req.GetResponse() r = New System.IO.StreamReader(res.GetResponseStream()) 'pge = r.ReadToEnd r.Close() res.Close() strError = "OK" status = "True" 'Convention is First Value is the Status and Second value is Errmsg strreturnstring = status & "~" & strError Return strreturnstring Catch ex status = "False" strError = ex.Message strreturnstring = status & "~" & strError Return strreturnstring End Try End Function any suggestion pls it urgent:) Regards ybasha

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups