Private Sub btn_Search_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Search.Click
Dim TempStream As Stream
Dim TempWebClient As New WebClient
Dim strUrl, strTemp, strHtml, strResult As String
strUrl = Me.txt_Url.Text.Trim
TempStream = TempWebClient.OpenRead("[url]http://www.baidu.com/s?wd=site%3A[/url]" & strUrl)
Dim tempRead As New StreamReader(TempStream, System.Text.Encoding.GetEncoding("GB2312"))
strHtml = tempRead.ReadToEnd()
Dim intTemp_1, intTemp_2 As Integer
intTemp_1 = InStr(strHtml, "百度一下") - 1
intTemp_2 = InStr(strHtml, "秒")
strResult = strHtml.Substring(intTemp_1, intTemp_2 - intTemp_1)
Me.lbl_Result.Text = strResult
End Sub


准备写个站长工具之类的东西的
之前一直以为想whois那样,给个接口来查,结果怎么都没头绪
后来想想算了,直接操作"流"好了,放上来备忘

Back