Hello all,
We are making an app which will let us upload some files to our ftp server automatically, but we've encountered the following problem:
While creating the string using the TipClientFtp() class, for example: "ftp://username:password@www.exampleserver.com" we cannot connect to the server when the password or username part contains the character "@"(which is necessary when creating new ftp account under cpanel inside the website).
So if the username looks like "John@www.exampleserver.com" then the ftp oReply returns "Server not found". Exactly the same thing happens when using a similar password containing the "@" character.
We've also tried to break the string into pieces creating a new TUrl() object and then passing it to the TipClientFtp(). But we had exactly the same results.
Any ideas?
Thanks in advance.
Nikos
Connect to Ftp Server problem
Moderator: Rathinagiri
Connect to Ftp Server problem
Best Regards,
Nikos.
os: Windows Server 2019 - 64
Nikos.
os: Windows Server 2019 - 64
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Connect to Ftp Server problem
Hola Nikos / Hi Nikos
Intenta con : Try With
Intenta con : Try With
Code: Select all
cServer := "ftp://johnsjn22.twentytwo.axc.nl"
cUser := "Eldemo@johnsjn22.twentytwo.axc.nl"
cPassword := "12345"
cUrl := cServer
oUrl := TUrl():New( cUrl )
oFTP := TIPClientFTP():New( oUrl, .T. )
oFTP:nConnTimeout := 20000
oFTP:bUsePasv := .F.
/* Comprobamos si el usuario contiene una @ para forzar el userid */
IF At( "@", cUser ) > 0
oFTP:oUrl:cServer := cServer
oFTP:oUrl:cUserID := cUser
oFTP:oUrl:cPassword := cPassword
ENDIF
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Re: Connect to Ftp Server problem
Thank you Daniel!
I will try this.
Nikos
I will try this.
Nikos
Best Regards,
Nikos.
os: Windows Server 2019 - 64
Nikos.
os: Windows Server 2019 - 64