Hello all,
I am new to HMG but Clippering since 1987...
I have some large applications in Clipper 5.2 and I am now rewriting most of it in HMG. All this goes very well !
But I have a problem/question: is there a way to FTP files to a website. I am now using DOS ftp and this not an
a certain/secure method. I read about COM_ functions and OPEN CONNECTION but I can't find documentation or samples.
Anybody any suggestions?
Regards and thanks,
Serge/Belgium
FTP and COM_ functions
Moderator: Rathinagiri
- serge_girard
- Posts: 3168
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
FTP and COM_ functions
There's nothing you can do that can't be done...
Re: FTP and COM_ functions
Hi serge_girard,
Try hbtip library.
For ftp
Try hbtip library.
For ftp
Code: Select all
#require "hbtip"
PROCEDURE Main( cUrl )
LOCAL oCon, oUrl
oUrl := TUrl():New( cUrl )
IF Empty( oUrl )
? "Invalid url " + cUrl
?
QUIT
ENDIF
IF oUrl:cProto != "ftp"
? "This is a 'DELE' test for ftp."
? "Use an ftp address with a file that you can delete."
?
QUIT
ENDIF
oCon := TIPClientFTP():New( oUrl )
oCon:nConnTimeout := 20000
? "Connecting with", oUrl:cServer
IF oCon:Open( cUrl )
? "Connection eshtablished"
? "Deleting", oUrl:cPath
IF oCon:CWD( oUrl:cPath )
? "CWD success"
IF oCon:Dele( oUrl:cFile )
? "DELE success"
ELSE
? "DELE Faliure (server reply:", oCon:cReply + ")"
ENDIF
ELSE
? "CWD Faliure (server reply:", oCon:cReply + ")"
ENDIF
oCon:Close()
ELSE
? "Can't connect with", oUrl:cServer
IF oCon:SocketCon == NIL
? "Connection not initiated"
ELSEIF hb_inetErrorCode( oCon:SocketCon ) == 0
? "Server sayed:", oCon:cReply
ELSE
? "Error in connection:", hb_inetErrorDesc( oCon:SocketCon )
ENDIF
ENDIF
? "Done"
?
RETURN
Best regards,
Oleksandr Antypenko
xHarbour 1.2.3 , Harbour 3.x + Mingw 4.x (HMG, minigui)
https://bitbucket.org/aantypenko
https://github.com/aantypenko
Oleksandr Antypenko
xHarbour 1.2.3 , Harbour 3.x + Mingw 4.x (HMG, minigui)
https://bitbucket.org/aantypenko
https://github.com/aantypenko
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: FTP and COM_ functions
The Santy friend forgot to say that if you need to secure tasacciones have to use the library hbtip with SSL support
Openssl need to download and install in c:\openssl
if using FTPS:// need some more changes.
http://en.wikipedia.org/wiki/FTPS
Openssl need to download and install in c:\openssl
if using FTPS:// need some more changes.
http://en.wikipedia.org/wiki/FTPS
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. 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: FTP and COM_ functions
Thank you danielmaximiliano
Best regards,
Oleksandr Antypenko
xHarbour 1.2.3 , Harbour 3.x + Mingw 4.x (HMG, minigui)
https://bitbucket.org/aantypenko
https://github.com/aantypenko
Oleksandr Antypenko
xHarbour 1.2.3 , Harbour 3.x + Mingw 4.x (HMG, minigui)
https://bitbucket.org/aantypenko
https://github.com/aantypenko
- serge_girard
- Posts: 3168
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: FTP and COM_ functions
Thx both,
In the example of Santy I get an error (IF oUrl:cProto != "ftp" -->Use an ftp address with a file that you can delete)
I made a FTP:ftp.xxxxx.xx folder.
Do I need something else?
Thx,S
In the example of Santy I get an error (IF oUrl:cProto != "ftp" -->Use an ftp address with a file that you can delete)
I made a FTP:ftp.xxxxx.xx folder.
Do I need something else?
Thx,S
There's nothing you can do that can't be done...
- serge_girard
- Posts: 3168
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: FTP and COM_ functions
I found a good solution on
http://www.creasolgroup.com/xOraclipLan ... _f.en.html
Topic can be closed.
Thx all,
Serge
http://www.creasolgroup.com/xOraclipLan ... _f.en.html
Topic can be closed.
Thx all,
Serge
There's nothing you can do that can't be done...