她提示错误连接或协议错误
应该如何修改?
With Winsock1
  .RemoteHost = "sms.sina.com.cn"
  .RemotePort = 80
  .LocalPort = 80
  .Connect
  .SendData "GET /cgi-bin/sms/register.cgi?" & "mobile=" & Text1.Text & "lang=" & langs & "\\HTTP/1.0" & vbCrLf
  End With

解决方案 »

  1.   

    With Winsock1
      .RemoteHost = "sms.sina.com.cn"
      .RemotePort = "80"
      .Connect
    End With我试了,上面的可以Connect OK!
      

  2.   

    Winsock1.Protocol = sckTCPProtocol
      

  3.   

    Private Sub Winsock1_Connect()
        .SendData "GET /cgi-bin/sms/register.cgi?" & "mobile=" & Text1.Text & "lang=" & langs & "\\HTTP/1.0" & vbCrLf
    End Sub发送数据的语句要放在连接成功事件里,不然就是报你那个错误
      

  4.   

    With Winsock1
      .RemoteHost = "sms.sina.com.cn"
      .RemotePort = 80
      .LocalPort = 80             ''错的地方,本地端口不用指定
      .Connect             '连接上了才可以发数据的,请在Connect事件里做个标志,  .SendData "GET /cgi-bin/sms/register.cgi?" & "mobile=" & Text1.Text & "lang=" & langs & "\\HTTP/1.0" & vbCrLf
      End With
      

  5.   

    还是报错
    40006
    黄色问题代码是:
    .SendData "GET /cgi-bin/sms/register.cgi?" & "mobile=" & Text1.Text & "lang=" & langs & "\\HTTP/1.0" & vbCrLf