October 17, 2021, 11:26:01

Author Topic: [bb] FTP in a nutshell by Cpt. Sovok [ 1+ years ago ]  (Read 1607 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] FTP in a nutshell by Cpt. Sovok [ 1+ years ago ]
« on: June 29, 2017, 00:28:43 »
Title : FTP in a nutshell
Author : Cpt. Sovok
Posted : 1+ years ago

Description : You must type all by yourself, its not as easy as BlitzFTP ^_^. for ftp-infos see: ftp://ftp.isi.edu/in-notes/rfc959.txt

in fact its quite useless, but easy to understand...

to get started, type:

[adress]
USER [username]
PASS [password]
HELP


Code :
Code: BlitzBasic
  1. ftp$ = Input("Adress>")
  2. com = OpenTCPStream(ftp$,21)
  3. Repeat
  4.  l$ = ReadLine$(com)
  5.  Print l$
  6.  i$ = Input(">")
  7.  WriteLine com, i$
  8. Until i$ = "quit"


Comments :


Ching(Posted 1+ years ago)

 What is that it?


GW(Posted 1+ years ago)

 whats the point of this? a command connections is useless without the data connection.


Wings(Posted 1+ years ago)

 ;use ftp to get a file from a ftp. filename'GET_FTP ("www.tiberion.com","username","password","Gamedemo","Tiberion.zip","C:Temp")Function GET_FTP(FTPserver$,usr$,psw$,remotedir$,filename$,dir$)   DeleteFile dir$+""+filename$   fileout=WriteFile("script.txt")   WriteLine fileout,"open "+FTPserver$   WriteLine fileout,usr$   WriteLine fileout,psw$   WriteLine fileout,"binary"   WriteLine fileout,"CD "+remotedir$   WriteLine fileout,"LCD "+dir$   WriteLine fileout,"GET "+filename$   WriteLine fileout,"BYE"         CloseFile fileout            ExecFile ("ftp -s:script.txt")      dir$=dir$+""      While FileSize (dir$+filename$)<1      Print "Awaiting transfare "+dir$+filename$+":SIZE:"+FileSize (dir$+filename$)      Delay 250   Wend      Print "Done"   End Function


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal