如何用VB程序实现,检测某QQ号是否在线?本人保证决不用与非法目的,纯属技术交流

解决方案 »

  1.   

    添加一个webbrowser控件(此法不能检测隐身)Private Sub Form_Load()
    WebBrowser1.Navigate "http://wpa.qq.com/pa?p=1:51672007:7"'51672007是要检测的QQ号
    End SubPrivate Sub webbrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
    Dim b As String
    b = URL
    If b <> "" And InStr(b, "qq.com") <> 0 Then
     If InStr(b, "online") <> 0 Then
      MsgBox "在线"
     Else
      MsgBox "不在线"
     End If
    Else
     MsgBox "打开失败"
    End If
    End Sub
      

  2.   

    很感谢vbweb ,我以前用这一句为什么就不行?
    WebBrowser1.Navigate "http://wpa.qq.com/pa?p=11:51672007:11"
    下面这个区别哪里?我真的不知,真诚求教
    1:51672007:7 与 11:51672007:11
      

  3.   

    用Internel transfer控件改写一下:
    Private Sub Command1_Click()
        On error resume next
        Dim QQUrl As String
        Dim QQ As String
        QQ = Text1.Text
        
        QQUrl = "http://wpa.qq.com/pa?p=1:" & QQ & ":7"
        Dim rlt() As Byte
        rlt = Inet1.OpenURL(QQUrl, icByteArray)
        If rlt(13) = &H34 Then
           MsgBox "下线"
        ElseIf rlt(13) = &H52 Then
           MsgBox "在线"
        Else
           MsgBox "不知道"
        End If
    End Sub