vb.net後台抓取網頁內容

    Public Function GetContent(ByVal url As String)
        On Error Resume Next
        Dim XmlHttp As Object
        XmlHttp = CreateObject("Microsoft.XMLHttp")
        XmlHttp.Open("POST", url, False)
        XmlHttp.Send()

        Dim vs As String
        vs = XmlHttp.responseText
        XmlHttp = Nothing
        GetContent =vs 
    End Function

你可能感兴趣的:(VB.NET)