este es el codigo
Código
Const Host As String = "localhost" 'Constante del host Private Sub Command1_Click() Winsock1.Connect Host, 80 'Conectamos al host End Sub Private Sub Command2_Click() Dim Peticion$ Peticion = "POST /archivos/upl2.php HTTP/1.0" & vbCrLf & _ "Host: " & Host & vbCrLf & _ "Content-Type: multipart/form-data, boundary=tyoasEdRQLsovS3LUFPBS5Eyy7tOwzil" & vbCrLf & _ "Content-Length: 197" & vbCrLf & _ vbCrLf & _ "--tyoasEdRQLsovS3LUFPBS5Eyy7tOwzil" & vbCrLf & _ "Content-Disposition: form-data; name='archivo'; filename='imagen.jpg'" & vbCrLf & _ "Content-Type: image/jpeg" & vbCrLf & _ vbCrLf & _ "Soy un jpg modificado!!!" & vbCrLf & _ "--tyoasEdRQLsovS3LUFPBS5Eyy7tOwzil—" Winsock1.SendData Peticion 'Mandamos la peticion End Sub Private Sub Timer1_Timer() If Winsock1.State = sckConnected Then 'Checamos si la conexion es activa o no Command1.Enabled = False Command2.Enabled = True Else Command1.Enabled = True Command2.Enabled = False End If End Sub
y con el flood ya agregado el codigo seria
Código
Const Host As String = "localhost" 'Constante del host Private Sub Command1_Click() Winsock1.Connect Host, 80 'Conectamos al host End Sub Private Sub txtEnvios_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case 13 KeyAscii = 0 Case 8, 43 To 46, 48 To 57 Case Else KeyAscii = 0 Beep End Select End Sub Private Sub Command2_Click() timerFlood.Enabled = True End Sub Private Sub timerFlood_Timer() For X = 1 To txtEnvios.Text Dim Peticion$ Peticion = "POST /archivos/upl2.php HTTP/1.0" & vbCrLf & _ "Host: " & Host & vbCrLf & _ "Content-Type: multipart/form-data, boundary=tyoasEdRQLsovS3LUFPBS5Eyy7tOwzil" & vbCrLf & _ "Content-Length: 197" & vbCrLf & _ vbCrLf & _ "--tyoasEdRQLsovS3LUFPBS5Eyy7tOwzil" & vbCrLf & _ "Content-Disposition: form-data; name='archivo'; filename='imagen.jpg'" & vbCrLf & _ "Content-Type: image/jpeg" & vbCrLf & _ vbCrLf & _ "Soy un jpg modificado!!!" & vbCrLf & _ "--tyoasEdRQLsovS3LUFPBS5Eyy7tOwzil—" Winsock1.SendData Peticion 'Mandamos la peticion Next X timerFlood.Enabled = False End Sub Private Sub Timer1_Timer() If Winsock1.State = sckConnected Then 'Checamos si la conexion es activa o no Command1.Enabled = False Command2.Enabled = True Else Command1.Enabled = True Command2.Enabled = False End If End Sub
No me tira ningun error pero tampoco sube las imagenes :S
¿Cual puede ser el error?