Hmmm... can I upload via FTP with nothing but PB?
Hmmm... can I upload via FTP with nothing but PB?
I really need to be able to upload via FTP... but I don't know how to do it in C++ and I don't know any DLLs either.
Hi,
if you are using Windows, you could use the WinApi-FTP-Functions. There are several examples here in the forum and on http://www.purearea.net, like the following one :
if you are using Windows, you could use the WinApi-FTP-Functions. There are several examples here in the forum and on http://www.purearea.net, like the following one :
Code: Select all
; www.purearea.net (Sourcecode collection by cnesm)
; Author:
; Date: 22. November 2003
#INTERNET_SERVICE_FTP=1
#INTERNET_OPEN_TYPE_DIRECT=1
#FTP_PORT=21
#FTP_TRANSFER_ASCII=1
#FTP_TRANSFER_BINARY=2
Proxy.s=""
ProxyBypass.s=""
ServerName.s="namedesftpservers"
UserName.s="testuser"
Password.s="testepass"
localfile.s="iptext.txt"
remotefile.s="iptext.txt"
hInternet=InternetOpen_("FTP",#INTERNET_OPEN_TYPE_DIRECT,Proxy,ProxyBypass,0)
If hInternet
hConnect=InternetConnect_(hInternet,ServerName,#FTP_PORT,UserName,Password,#INTERNET_SERVICE_FTP,0,0)
If hConnect
If FtpPutFile_(hConnect,localfile,remotefile,#FTP_TRANSFER_ASCII,0)
MessageRequester("","File has been sent",0)
Else
MessageRequester("Error", "Failure while sending file...",0)
EndIf
Else
MessageRequester("Error", "Couldn't get a connection to the server!",0)
EndIf
InternetCloseHandle_(hInternet)
Else
MessageRequester("Error", "Internet isn't reachable.",0)
EndIf
regards,
benny!
-
pe0ple ar3 str4nge!!!
benny!
-
pe0ple ar3 str4nge!!!
@deadmop:
If you do not know what thefool means ... try this as a start :
If you do not know what thefool means ... try this as a start :
(1) open a dos-box / console-window
(2) type "telnet ftp.yourserver.com 21"
(3) after you are connected type "USER youraccount"+RETURN
(4) then type "PASS yourpassword"+RETURN
(5) type "HELP" for available commands
regards,
benny!
-
pe0ple ar3 str4nge!!!
benny!
-
pe0ple ar3 str4nge!!!
-
- User
- Posts: 60
- Joined: Wed Apr 30, 2003 2:25 pm
- Location: Västerås
- Contact:
deadmoap,
Consider using REBOL. The core is free.
http://www.rebol.com/docs/core23/rebolcore-13.html
Consider using REBOL. The core is free.
http://www.rebol.com/docs/core23/rebolcore-13.html