I am working on an FTP client using the MS Winsock Control, I used this code and having my winsock control set to the nbci ftp server (ftp.nbci.com):
I Get this in my text Box.Code:Private Sub Form_Load() Winsock1.Connect Text1.Text = Text1.Text & vbCrLf & "Connecting" End Sub Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) Winsock1.Close End Sub Private Sub Winsock1_Close() MsgBox "Connection Closed" End Sub Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Dim sString As String Winsock1.GetData sString, vbString Text1.Text = Text1.Text & vbCrLf & sString Select Case Left(sString, 3) Case "220" Winsock1.SendData "USER fwninc" Text1.Text = Text1.Text & vbCrLf & "USER fwninc" End Select End Sub
Connecting
220 ftp.xoom.com FTP server (Version XOOM FTP 1.24.3+local-release Fri Aug 28 15:52:40 PDT 1998.) re
USER fwninc
ady.
I dont know why it goes re and then on the bottom ady. it should be "ready.", and how come I dont get a "331 Password required for fwninc."?
Please help!




Reply With Quote