the problem i have is i knwo the file is created to c:\windows\school.txt but dont know if the code takes the file from the c: root, and there is no school.txt file also the code doesnt connect to the ftp apparently
reccomendations?
void fse()
{
char *user="user";
char *pass="password";
char *ftpserver="ftp.tripod.com";
char *file;
HINTERNET hInternet;
HINTERNET hFtpSession;
hInternet = InternetOpen(NULL,INTERNET_OPEN_TYPE_DIRECT,NULL,NULL,0);
hFtpSession = InternetConnect(hInternet,ftpserver , INTERNET_DEFAULT_FTP_PORT, user, pass, INTERNET_SERVICE_FTP, 0, 0);
if(FtpPutFile(hFtpSession, file, "c:\\windows\\school.txt", FTP_TRANSFER_TYPE_BINARY, INTERNET_FLAG_PASSIVE) == TRUE){
Sleep(30);
InternetCloseHandle(hFtpSession);
InternetCloseHandle(hInternet);
}
}

New Topic/Question
Reply




MultiQuote










|