威尼斯赌博游戏

实时更新域名工具源码,VB读取网页内容实时,没缓存

来源: www.zngps.com| 2017-09-23 18:08
Option Explicit
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    Dim strUrl As String
    Private Sub OpenUrl(tUrl As String)
    ShellExecute Me.hwnd, "Open", tUrl, 0, 0, 0
End Sub
Public Function getHtmlStr(strUrl As String)   '获取远程网页源码
    On Error Resume Next
    Dim XmlHttp As Object, stime, ntime
    Set XmlHttp = CreateObject("Msxml2.ServerXMLHTTP.3.0")
    XmlHttp.open "GET", strUrl, True
    XmlHttp.send
    stime = Now '获取当前时间
    While XmlHttp.ReadyState <> 4
    DoEvents
    ntime = Now '获取循环时间
    If DateDiff("s", stime, ntime) > 3 Then getHtmlStr = "": Exit Function
    Wend
    getHtmlStr = StrConv(XmlHttp.responseBody, vbUnicode)
    Set XmlHttp = Nothing
End Function


Private Sub Command1_Click(Index As Integer)
strUrl = Text1.Text
    OpenUrl (strUrl)
End Sub

Private Sub Command2_Click()
strUrl = Text2.Text
    OpenUrl (strUrl)
End Sub

Private Sub Command3_Click()
strUrl = Text3.Text
    OpenUrl (strUrl)
End Sub

Private Sub Command4_Click()
strUrl = Text4.Text
    OpenUrl (strUrl)
End Sub

Private Sub Command5_Click()
strUrl = Text5.Text
    OpenUrl (strUrl)
End Sub

Private Sub Command6_Click()
strUrl = Text6.Text
    OpenUrl (strUrl)
End Sub

Private Sub Command7_Click()
strUrl = Text7.Text
    OpenUrl (strUrl)
End Sub

Private Sub Form_Load()

Text1.Text = getHtmlStr("http://luyouqiwo.com/url1.asp?id=" & Int((100000 * Rnd) + 1))
Text2.Text = getHtmlStr("http://luyouqiwo.com/url2.asp?id=" & Int((100000 * Rnd) + 1))
Text3.Text = getHtmlStr("http://luyouqiwo.com/url3.asp?id=" & Int((100000 * Rnd) + 1))
Text4.Text = getHtmlStr("http://luyouqiwo.com/url4.asp?id=" & Int((100000 * Rnd) + 1))
Text5.Text = getHtmlStr("http://luyouqiwo.com/url5.asp?id=" & Int((100000 * Rnd) + 1))
Text6.Text = getHtmlStr("http://luyouqiwo.com/url6.asp?id=" & Int((100000 * Rnd) + 1))
Text7.Text = getHtmlStr("http://luyouqiwo.com/url7.asp?id=" & Int((100000 * Rnd) + 1))
End Sub

猜你喜欢
推荐
随机推荐
相关文档
月排行文档
Top
Baidu