Home » Renegade Discussions » Mod Forum » FTP Uploader script
Re: FTP Uploader script [message #411805 is a reply to message #411355] |
Sat, 21 November 2009 23:23 |
|
Hex
Messages: 858 Registered: March 2004
Karma:
|
Colonel |
|
|
DWORD __stdcall Upload(void *)
{
char Path[256];
GetCurrentDirectoryA(52, Path);
strcat(Path, "\\YourFile.txt");
void *f = (void *)fopen(Path, "w");
for (GenericSLNode* PlayerIter = PlayerList->HeadNode; (PlayerIter != NULL); PlayerIter = PlayerIter->NodeNext)
{
cPlayer *p = (cPlayer *)PlayerIter->NodeData;
if (p->IsActive)
{
const char *Nick = WideCharToChar(p->PlayerName);
fprintf((FILE *)f, "Nick %s\tScore %.0f\tKills %d\tDeaths %d\n", Nick, p->Score.Get(), p->Kills.Get(), p->Deaths.Get());
delete[] Nick;
}
}
fclose((FILE *)f);
HINTERNET intern = InternetOpen("YaRR", INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0);
if(!intern)
{
printf("Unable to open an internet - %d\n", GetLastError());
return 0;
}
HINTERNET intern2 = InternetConnect(intern, "FTP Address", 21, "User Name", "Password", INTERNET_SERVICE_FTP, 0, 0);
if(!intern2)
{
printf("Unable to open a connection.\n");
InternetCloseHandle(intern);
return 0;
}
char ftpstr[256];
sprintf(ftpstr, "./%s/%s","FTP Root", Path);
if(FtpPutFile(intern2, Path, ftpstr, FTP_TRANSFER_TYPE_BINARY, 0))
{
printf("Uploaded.\n");
}
else
{
printf("Upload failed.\n");
}
InternetCloseHandle(intern);
return 0;
}
Reborn, this is why I don't normally post in this forum...
goztow wrote on Tue, 11 May 2010 08:00 | If we had to ban all who ever cheated or ever created a cheat (obj3cts and such) then I don't think there would be many members left here (sad fact).
|
reborn wrote on Fri, 29 January 2010 23:37 | std is for pro's.
|
|
|
|
|
|
FTP Uploader script
|
|
|
Re: FTP Uploader script
By: zunnie on Wed, 18 November 2009 23:39
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: reborn on Thu, 19 November 2009 01:27
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: jnz on Thu, 19 November 2009 10:01
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: jnz on Thu, 19 November 2009 11:32
|
|
|
Re: FTP Uploader script
By: Hex on Thu, 19 November 2009 11:57
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: Hex on Fri, 20 November 2009 02:48
|
|
|
Re: FTP Uploader script
By: reborn on Fri, 20 November 2009 03:20
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: Hex on Fri, 20 November 2009 14:16
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: Hex on Fri, 20 November 2009 20:49
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: Hex on Sat, 21 November 2009 11:24
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: reborn on Sat, 21 November 2009 13:20
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: reborn on Sat, 21 November 2009 14:30
|
|
|
Re: FTP Uploader script
By: Lone0001 on Sat, 21 November 2009 15:20
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: Lone0001 on Sat, 21 November 2009 18:34
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: Hex on Sat, 21 November 2009 22:25
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: Hex on Sat, 21 November 2009 22:49
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: Hex on Sat, 21 November 2009 23:08
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: Hex on Sat, 21 November 2009 23:23
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: Hex on Sat, 21 November 2009 23:33
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: reborn on Sun, 22 November 2009 03:57
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: reborn on Fri, 27 November 2009 14:37
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: reborn on Sat, 28 November 2009 04:45
|
|
|
Re: FTP Uploader script
By: reborn on Sat, 28 November 2009 09:08
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: reborn on Mon, 30 November 2009 12:54
|
|
|
Re: FTP Uploader script
By: jnz on Mon, 30 November 2009 14:53
|
|
|
Re: FTP Uploader script
|
|
|
Re: FTP Uploader script
By: reborn on Tue, 01 December 2009 03:11
|
|
|
Re: FTP Uploader script
By: jnz on Tue, 01 December 2009 05:05
|
|
|
Re: FTP Uploader script
|
Goto Forum:
Current Time: Tue Nov 12 21:04:09 MST 2024
Total time taken to generate the page: 0.01214 seconds
|