http Response
-
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