el problema q tengo es para enviar las imagenes.¿alguien sabe como se hace??
aqui les pongo un fragmento del codigo:
Código:
Private Sub WS_DataArrival(ByVal bytesTotal As Long)
Dim data As String
Dim dataEnv, a As String
Dim FilName As String
WS.GetData data
Text1.Text = Text1.Text & vbCrLf & data
If Mid(data, 1, 3) = "GET" Then
'MsgBox Len(Trim(Mid(data, InStr(1, data, "/") + 1, InStr(1, data, "HTTP") - InStr(1, data, "/")))) & "--" & Trim(Mid(data, InStr(1, data, "/") + 1, InStr(1, data, "HTTP") - InStr(1, data, "/")))
If Trim(Mid(data, InStr(1, data, "/") + 1, InStr(1, data, "HTTP") - InStr(1, data, "/"))) = "H" Then
Open "index.htm" For Input As #1
dataEnv = ""
Do While Not EOF(1)
Input #1, a
dataEnv = dataEnv & a
Loop
Close #1
WS.SendData dataEnv
Else
FilName = Trim(Mid(data, InStr(1, data, "/") + 1, InStr(1, data, "HTTP") - InStr(1, data, "/") - 1))
MsgBox FilName
WS.SendData "HTTP/1.1 200 OK" & vbCrLf & _
"Age: 91875" & vbCrLf & _
"Accept -Ranges: bytes" & vbCrLf & _
"Date: Thu, 21 Sep 2006 20:35:18 GMT" & vbCrLf & _
"Content-Length: 501897" & vbCrLf & _
"Content-Type: image/jpeg" & vbCrLf & _
"Server: Apache/1.3.34 (Unix) mod_auth_passthrough/1.8 mod_bwlimited/1.4 mod_log_bytes/1.2 mod_ssl/2.8.25 OpenSSL/0.9.7f FrontPage/5.0.2.2635" & vbCrLf & _
"Last-Modified: Tue, 15 Aug 2006 06:28:02 GMT" & vbCrLf & vbCrLf
Open Trim(FilName) For Input As #1
dataEnv = ""
Do While Not EOF(1)
Input #1, a
dataEnv = dataEnv & a
Loop
Close #1
WS.SendData dataEnv
End If
End If
Timer1.Enabled = True
End Sub