Hi,
I thought it would be pretty clever to make a little FTP uploader client.
I have made one in DBP but it should work in DBC also. It is pretty neat. You can upload your files straight from your PC to your FTP without purchasing one of those ftp programs or loggin into your ftp site manually.
Well here is the code:
Rem Project: File Uploader1
Rem Created: 11/21/2003 5:13:08 PM
Rem ***** Main Source File *****
sync on : sync rate 50
start:
cls
do
Text 30,30,"Push Return To Upload A File"
text 30,60,"Push Shift To Exit"
if returnkey()=1 then goto upload
if shiftkey()=1 then goto quit
sync
loop
upload:
cls
do
input "Your FTP Address: ";url$
input "Your FTP Username: ";user$
input "Your FTP Password: ";pass$
goto upload0
sync
loop
upload0:
cls
do
Text 30,30,"Type In The Exact Name Of The File"
Text 30,100,"Make Sure The File Is In The Same Directory As This Program"
text 30,45,"Example: file.zip"
Text 30,115,"Please Don't Send Us Anything Greater Than 5MB"
Set cursor 30,75
input "";file$
goto upload1
sync
loop
upload1:
cls
do
print "Uploading: ",file$
text 30,60,"Please Wait...."
sync
wait 1000
goto upload2
sync
loop
upload2:
cls
do
ftp connect url$,user$,pass$
ftp set dir dir$
ftp put file file$
set cursor 30,30
goto start
sync
loop
quit:
cls
do
ftp terminate
ftp disconnect
end
sync
loop
Um I would Apprieciate it, that if you are to duplicate this code please use my name in it somewhere.... Like credits or something.
You can download the full EXE from my site also.
Later
Nicolas