into my browser I get a file back with the text for EGPH -that's the ICAO code for an airfield, and that FTP call returns the weather for that airfield, EGPH being Edinburgh in the UK.
My question is how do I replicate this in B4A? The login for the NOAA.GOV site is via anonymous FTP through port 21, so I have been trying to connect and get the weather text using the following code:
the_ftp="ftp://tgftp.nws.noaa.gov"
myFTP.ABFTPConnect(the_ftp,21,"anonymous","")
If myFTP.ABFTPConnected = True Then
Msgbox("Connected", "")
Else
Msgbox(myFTP.ABFTPLastError, "")
Return
End If
This does not work. I just get an "Error connecting" message back.
And as a result, the following code to retrieve the weather and store it locally never gets to run - although I suspect this code is wrong too.
Hi Erel. Yes, I had tried almost every combination I could think of for the login. I used SmartFTP to watch how it succesfully logged in, and it used "anonymous" as the login.
However, I fixed it as below.
I tried removing the "ftp://" bit from the_FTP string to make the connection string as below:
myFTP.ABFTPConnect("79.34.70.18", 21, "marco" ,"delfino")
If myFTP.ABFTPConnected = True Then
Msgbox("Connected", "")
Else
Msgbox(myFTP.ABFTPLastError, "")
Return
End If
many times it doesn't connect at all
some times it works
I have no problem with a normal pc based sw
Any idea?
ciao marco