编程语言

img iwebsms

使用HttpWebRequest获得URL的返回值

发表于2004/9/28 19:40:00  1562人阅读

'使用HttpWebRequest获得URL的返回值

Function GetUrlValue(ByVal Url As String) As String

    Dim HttpWebRequest As System.Net.WebRequest = System.Net.WebRequest.Create(Url)

 

    Dim HttpWebResponse As System.Net.WebResponse = HttpWebRequest.GetResponse()

    Dim HttpStreamReader As New System.IO.StreamReader(HttpWebResponse.GetResponseStream(), System.Text.Encoding.GetEncoding("GB2312"))

 

    Return HttpStreamReader.ReadToEnd

End Function

阅读全文
0 0

相关文章推荐

img
取 消
img