Jump to content
Sign in to follow this  

FTP Problems [Solved]

Recommended Posts


Alright, so I'm trying to connect to a FTP Server. My problem is that I need a way to differentiate between _FTP_Connect:

  • Not finding a Server
  • Having trouble logging in
As these things both return 0 by _FTP_Connect, I cannot determine which one is actually the problem. Any ideas?

Also, there is no problem with my other code, such as _FTP_Open, because on other servers I can connect just fine.

Sorry for the minimal amount of information. I don't know how else to explain what I need help with.

Edit: Solved this one myself. Guess this could server as help for anyone else with a similar problem.

Func _FTP_ServerExists()
    Local $sFTP_Error, $sFTP_Message

    _FTP_GetLastResponseInfo($sFTP_Error, $sFTP_Message)
    If StringReplace(StringReplace(StringReplace(StringReplace($sFTP_Message, @TAB, ""), @LF, ""), @CR, ""), " ", "") = "" Then
        ConsoleWrite("No Response!" & @CRLF)
        Return 0
    Return 1
Edited by darkjohn20

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.