LOCAL loFTP, liState,liCID
SET PROCEDURE TO ftp.prg ADDITIVE
loFTP=CREATEOBJECT('ftp_service')
liState=loFTP.GetConnectedState() && Check Connected state
IF liState=-1
?loFTP.GetExtendedErrorCode(),loFTP.GetExtendedErrorMsg()
RETURN
ENDIF
IF BITTEST(liState,0) && Use Modem?
liCID=loFTP.DialInternet("MACONNEXION",1)
ENDIF
IF (BITTEST(liState,0) AND liCID>0 OR !BITTEST(liState,0)) AND ;
loFTP.OpenInternet("ABONNE", "PWD", "10.10.10.10", "21")
* Try to get a handle into the Internet and Connect Briefly with the FTP Site
* Note: Insert your USER ID, PASSWORD, FTP ADDRESS, PORT # Here
* Note: ("21" is the Default Port)
?"Connection réussie"
=loFTP.CloseInternet()
ENDIF
=loFTP.DialHangUp(liCID)
RELEASE PROCEDURE ftp.prg