I am trying to add an email option to my script to update me on connection failed. The email side of it works really well, except for one problem, it always thinks that connection has failed, even when it hasn't.
the relevant part of my script is:
The log file output is:
I have tried a couple of different FTP servers, just to make sure. Any ideas what I am doing wrong?
the relevant part of my script is:
FTP Script
The log file output is:
SETPORT("21")I then proceed to get an email telling me that the connection failed, despite it quite clearly telling me it has connected!
Setting TCP port to 21.
OPENHOST("127.0.0.1","Test",******)
Connecting to 127.0.0.1
Resolving host name "127.0.0.1"
Connecting to 127.0.0.1 Port: 21
Connected to 127.0.0.1.
220 FileZilla Server version 0.9.41 beta
USER Test
331 Password required for Test
PASS password
230 Logged on
SYST
215 UNIX emulated by FileZilla
FEAT
211-Features:
MDTM
REST STREAM
SIZE
MLST type*;size*;modify*;
MLSD
UTF8
CLNT
MFMT
211 End
OPTS UTF8 ON
200 UTF8 mode enabled
PWD
257 "/" is current directory.
Connected.
Cannot connect to FTP. Sending an email and aborting in 5 seconds.
I have tried a couple of different FTP servers, just to make sure. Any ideas what I am doing wrong?
so close yet so far. Just needed to add '$result=' in front of the OPENHOST.
cheers,
cheers,
Thanks Wandrey
liked Script FTP? Try our other product Email Parser