ftp linux sample code. where of.........

ftp linux sample code. where of.........

Postby yunbg1 » Wed Nov 26, 2008 12:39 pm

ftp linux sample cords will be a possibility where of buying and peels.
FWH User
FWPPC User
FWLinux User
yunbg1
 
Posts: 107
Joined: Sun Nov 13, 2005 12:40 am
Location: Winnipeg Canada

Postby Antonio Linares » Wed Nov 26, 2008 1:19 pm

I don't understand what you mean, sorry.

Could you explain with more detail your question ? thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41312
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby yunbg1 » Wed Nov 26, 2008 2:34 pm

Hi Antonio.

LINUX File Transfer Protocol (FTP) Client.
Composition or method?

Windows sample program-> Sees the sample code.

Code: Select all  Expand view

hLib := LOADLIB32( "wininet.dll" )
hInternet := INETOPEN( "Anystring", 0, 0, 0, 0 )
hConnect := INETCONNECT( hInternet, cFtpSite, 21, cFtpUser, cFtpPassword, INTERNET_SERVICE_FTP, 0, 0 )
nSize := ftp_dir(cFTPRemote)
nFileSize := 0
if file(cFtpLocal)
   nFileSize := FSize(cFtpLocal)
   if nFilesize != nSize
      ferase(cFtpLocal)
     else
      lReturn := .t.
      iNetClose( hConnect )
      iNetClose( hInternet )
      FreeLib32( hLib )
      RETU lReturn
   endi
endi

if nSize == 0
   lReturn := .f.
  else
   hFile := FtpOpenFile( hConnect, cFtpRemote, GENERIC_READ, FTP_TRANSFER_TYPE_BINARY, 0 )
   if hFile == 0
      lReturn := .f.
     else
      handle := fcreate(cFtpLocal)
      if handle == -1
         RETU (.f.)
      endi
      cBuffer := Space( nBytes )
      co1 := 0
      do while .t.
         lReturn := InternetReadFile(hFile, cBuffer, nBytes, @nRead)
         if lReturn == .f.
            exit
         endi
         fwrite(handle, cBuffer, nRead)
         nProgress := nProgress + nRead
         if nProgress >= nSize
            exit
         endi
      endd
      fclose(handle)
      iNetClose( hFile )
   endi
endi
iNetClose( hConnect )
iNetClose( hInternet )
FreeLib32( hLib )



Linux sample program -> Does to do how from linux ?
OS->Centos 5.0
FWH User
FWPPC User
FWLinux User
yunbg1
 
Posts: 107
Joined: Sun Nov 13, 2005 12:40 am
Location: Winnipeg Canada


Return to FiveLinux / FiveDroid (Android)

Who is online

Users browsing this forum: No registered users and 1 guest