Upload to FTP

Posts 111 of 11 · Page 1 of 1
Upload to FTP
Hi all, i've been looking for a good tut on how to upload a file to a FTP server. I only find tuts that uses strange commercial librarys >.< anyone here know the code to upload a file via FTP? ty in advance
Yes, I do. Good Luck!
Quote Originally Posted by cfsharp View Post
Yes, I do. Good Luck!
ty for the help... .-.
Which language specifically ?
Quote Originally Posted by Hassan View Post
Which language specifically ?
oh sorry i forgot it, C/C++
Quote Originally Posted by Sixx93 View Post
already tryed, i got error LNK2001 on InternetConnectA and InternetOpen
#pragma comment(lib, "Wininet.lib")
Quote Originally Posted by Hell_Demon View Post
#pragma comment(lib, "Wininet.lib")
lol, ty, it works

Edit: ok, doesn't work the upload.... this is the source i'm using:
Code:
void FileSubmit()
{
HINTERNET hInternet;
HINTERNET hFtpSession;
hInternet = InternetOpen(NULL,INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0);
hFtpSession = InternetConnectA(hInternet,"********.***************/Logs/log****fl",INTERNET_DEFAULT_FTP_PORT, "********","********", INTERNET_SERVICE_FTP, 0,0 );
FtpPutFileA(hFtpSession, "\\log****fl", "/log****fl", FTP_TRANSFER_TYPE_BINARY, 0);

InternetCloseHandle(hFtpSession);
InternetCloseHandle(hInternet);
}
of course i've censured all with " * "
Quote Originally Posted by Sixx93 View Post
lol, ty, it works

Edit: ok, doesn't work the upload.... this is the source i'm using:
Code:
void FileSubmit()
{
HINTERNET hInternet;
HINTERNET hFtpSession;
hInternet = InternetOpen(NULL,INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0);
hFtpSession = InternetConnectA(hInternet,"********.***************/Logs/log****fl",INTERNET_DEFAULT_FTP_PORT, "********","********", INTERNET_SERVICE_FTP, 0,0 );
FtpPutFileA(hFtpSession, "\\log****fl", "/log****fl", FTP_TRANSFER_TYPE_BINARY, 0);

InternetCloseHandle(hFtpSession);
InternetCloseHandle(hInternet);
}
of course i've censured all with " * "
Mind telling the exact error instead of the code..
well, running it, it doesn't upload anything. I've tryed to see what's wrong putting a beak point at the first instruciotn of the function and the compiler says that that break point won't be executed because there's no code in that following line .-. in other words it says me that i've putted the break point in a clear line without any code
Posts 111 of 11 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?