Some elements from my code ... you can piece it together from these I believe:
PRIVATE iDLL := LoadLibrary( "wininet.dll" )
*************************************************
FUNCTION sendfile
LOCAL mCLinkFt := "ftp.yoursite.com"
LOCAL mCLinkUn := "username"
LOCAL mCLinkPw := "password"
// Establish connection and transfer data
hInternet := InternetOpen( "ABC",1,0,0,0 )
hconnect := InterNetConnect( hInternet, mCLinkFt, 0, mCLinkUn, mCLinkPw, 1, INTERNET_FLAG_PASSIVE, 0 )
IF hconnect == 0
IF FTPPutFile( hConnect, cUpFile, cNameFile, 0, 0 )
MsgInfo( "Uploaded" )
ELSE
MsgInfo( "Failed" )
ENDIF
ENDIF
// Close connections and release library
INETCLOSEHANDLE( hConnect )
INETCLOSEHANDLE( hInternet )
RETURN NIL
**************************************************
DLL32 FUNCTION InternetOpen( cAgent AS LPSTR, nAccessType AS DWORD, cProxyName AS LPSTR, cProxyBypass AS LPSTR, nFlags ;
AS DWORD ) AS LONG PASCAL FROM "InternetOpenA" LIB iDLL
DLL32 FUNCTION INETCLOSEHANDLE( hInternet AS LONG ) AS BOOL;
PASCAL FROM "InternetCloseHandle" LIB iDLL
DLL32 FUNCTION FTPGETFILE( hConnect AS LONG, cRemoteFile AS LPSTR, cNewFile AS LPSTR, nFailIfExists AS LONG, ;
nFlagsAndAttribs AS DWORD, nFlags AS DWORD, @nContext AS PTR ) AS BOOL PASCAL FROM "FtpGetFileA" LIB iDLL
DLL32 FUNCTION FtpPutFile( hFTP AS LONG, cFileName AS LPSTR, cDestFile AS LPSTR,;
n1 AS LONG, n2 AS LONG ) AS BOOL PASCAL ;
FROM "FtpPutFileA" LIB iDLL
DLL32 FUNCTION InternetConnect( hSession AS LONG, cHost AS LPSTR, nPort AS LONG,;
cUserName AS LPSTR, cPassword AS LPSTR, n4 AS LONG, n5 AS LONG,;
n6 AS LONG ) AS LONG PASCAL ;
FROM "InternetConnectA" LIB iDLL