Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » FTP Uploader script
FTP Uploader script [message #411355] Wed, 18 November 2009 18:09 Go to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

Could someone help me on making a uploader script to add into Yarr bot or for SSGM plug in?

i don't want someone to just give it to me i would like to learn how to make it.
i was looking at this code.
Link with Wininet.lib
where does this one go?
#include "Wininet.h"

where does this one go?
DWORD __stdcall Upload(void *)
{
	printf("Start upload...\n");
	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, "So my ftp host?", 21, "my username?]", "My password?]", INTERNET_SERVICE_FTP, 0, 0);

	if(!intern2)
	{
		printf("Unable to open a connection - %d\n", GetLastError());
		InternetCloseHandle(intern);
		return 0;
	}

	if(FtpPutFile(intern2, "name of the html here?.html", "or here?.html", FTP_TRANSFER_TYPE_BINARY, 0))
	{
		printf("Upload complete\n");
	}
	else
	{
		printf("Upload failed - %d\n", GetLastError());
	}

	InternetCloseHandle(intern);
	return 0;
}


where does this one go?
CreateThread(0, 0, Upload, 0, 0, 0); //start

Well SSGM Plugin don't like it, i tryed to make it a plug in and i get these errors.
1>.\FTPUploader.cpp(33) : error C2065: 'HINTERNET' : undeclared identifier
1>.\FTPUploader.cpp(33) : error C2146: syntax error : missing ';' before identifier 'intern'
1>.\FTPUploader.cpp(33) : error C2065: 'intern' : undeclared identifier
1>.\FTPUploader.cpp(33) : error C2065: 'INTERNET_OPEN_TYPE_DIRECT' : undeclared identifier
1>.\FTPUploader.cpp(33) : error C3861: 'InternetOpen': identifier not found
1>.\FTPUploader.cpp(39) : error C2146: syntax error : missing ';' before identifier 'intern2'
1>.\FTPUploader.cpp(39) : error C2065: 'intern2' : undeclared identifier
1>.\FTPUploader.cpp(39) : error C2065: 'INTERNET_SERVICE_FTP' : undeclared identifier
1>.\FTPUploader.cpp(39) : error C3861: 'InternetConnect': identifier not found
1>.\FTPUploader.cpp(44) : error C3861: 'InternetCloseHandle': identifier not found
1>.\FTPUploader.cpp(48) : error C2065: 'FTP_TRANSFER_TYPE_BINARY' : undeclared identifier
1>.\FTPUploader.cpp(48) : error C3861: 'FtpPutFile': identifier not found
1>.\FTPUploader.cpp(57) : error C3861: 'InternetCloseHandle': identifier not found

also what will this put on my website just that the server is online or will it put up the server info like how many players scores k/ds?
but it idk what to do with it, and i can't see the website's of that other guys post.


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide

[Updated on: Wed, 18 November 2009 23:04]

Report message to a moderator

Re: FTP Uploader script [message #411386 is a reply to message #411355] Wed, 18 November 2009 23:39 Go to previous messageGo to next message
zunnie is currently offline  zunnie
Messages: 2959
Registered: September 2003
Location: Netherlands
Karma: 0
General (2 Stars)

All you need to do to fix that is to put #include "Wininet.h" at the top (preferably) of the cpp file. Then compile Smile


https://multiplayerforums.com/uploads/monthly_2018_03/TCW2_Signature.png.6236a0dbc6e1e53472a18fe8cd15e47b.png
Re: FTP Uploader script [message #411390 is a reply to message #411355] Thu, 19 November 2009 00:42 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

now i get this, and me and zunnie can't figure it out cus when he compiled it it worked, than i was trying to add some .ini settings and now it don't work i tried to do it all over again but nothing.
here is the html out put.

zunnie says that i need the .h code for this but there is none, how would i go about making it?
  • Attachment: BuildLog.htm
    (Size: 25.27KB, Downloaded 179 times)


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: FTP Uploader script [message #411393 is a reply to message #411355] Thu, 19 November 2009 01:27 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
This should help you:
http://www.renegadeforums.com/index.php?t=msg&goto=388081&rid=3415#msg_3 88081



Re: FTP Uploader script [message #411421 is a reply to message #411355] Thu, 19 November 2009 06:17 Go to previous messageGo to next message
Sladewill is currently offline  Sladewill
Messages: 291
Registered: January 2009
Location: United Kingdom
Karma: 0
Recruit

Im sorry that that went missing, i accidently deleted everything on that site, ill put that back up when i can

FT-Owners - Sladewill,Snazy2007,Willdy
http://FT-Gaming.com for more info...
Re: FTP Uploader script [message #411439 is a reply to message #411355] Thu, 19 November 2009 10:01 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
The FTP uploader function is already in YaRR, and it already works. That code is what you already took out of YaRR!

[Updated on: Thu, 19 November 2009 10:01]

Report message to a moderator

Re: FTP Uploader script [message #411448 is a reply to message #411355] Thu, 19 November 2009 11:07 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

Its in Yarr? where do i find that i've never seen a uploader in it.

Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: FTP Uploader script [message #411457 is a reply to message #411448] Thu, 19 November 2009 11:32 Go to previous messageGo to next message
jnz is currently offline  jnz
Messages: 3396
Registered: July 2006
Location: 30th century
Karma: 0
General (3 Stars)
Distrbd21 wrote on Thu, 19 November 2009 18:07

Its in Yarr? where do i find that i've never seen a uploader in it.


That code you have is from YaRR, although it might not have been released. It's in YaRRPHP.cpp
Re: FTP Uploader script [message #411459 is a reply to message #411355] Thu, 19 November 2009 11:57 Go to previous messageGo to next message
Hex is currently offline  Hex
Messages: 858
Registered: March 2004
Karma: 0
Colonel
Not sure of it was in YaRRPHP, but it was jnz that did it because afaik he originally make the FTP function for me

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. Razz
Re: FTP Uploader script [message #411500 is a reply to message #411355] Thu, 19 November 2009 17:51 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

Edit is there anyway to convert BR's plug in fds status reporter to SSGM plug in? if so where can i get the source of the plug in

Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide

[Updated on: Thu, 19 November 2009 21:35]

Report message to a moderator

Re: FTP Uploader script [message #411537 is a reply to message #411500] Fri, 20 November 2009 02:48 Go to previous messageGo to next message
Hex is currently offline  Hex
Messages: 858
Registered: March 2004
Karma: 0
Colonel
Ones Perl and ones C++, you can't convert Perl to C++

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. Razz
Re: FTP Uploader script [message #411538 is a reply to message #411355] Fri, 20 November 2009 03:20 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
What is it you actually want to accomplish?


Re: FTP Uploader script [message #411565 is a reply to message #411355] Fri, 20 November 2009 08:40 Go to previous messageGo to next message
Sladewill is currently offline  Sladewill
Messages: 291
Registered: January 2009
Location: United Kingdom
Karma: 0
Recruit

The first one i released wasnt in yarr i actually did with a batch file

FT-Owners - Sladewill,Snazy2007,Willdy
http://FT-Gaming.com for more info...
Re: FTP Uploader script [message #411588 is a reply to message #411538] Fri, 20 November 2009 11:48 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

reborn wrote on Fri, 20 November 2009 04:20

What is it you actually want to accomplish?

i'm trying to make a SSGM plug in that will upload my server status to my website, witch will show what map it is on, is the server online, how many players,scores,k/ds,rank, etc

Edit:This way nobody has to relay on a bot doing it for them..


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide

[Updated on: Fri, 20 November 2009 11:56]

Report message to a moderator

Re: FTP Uploader script [message #411617 is a reply to message #411588] Fri, 20 November 2009 14:16 Go to previous messageGo to next message
Hex is currently offline  Hex
Messages: 858
Registered: March 2004
Karma: 0
Colonel
Thats easy enough to do, lets see what you have done so far

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. Razz
Re: FTP Uploader script [message #411678 is a reply to message #411617] Fri, 20 November 2009 20:41 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

Hex wrote on Fri, 20 November 2009 15:16

Thats easy enough to do, lets see what you have done so far

what you mean?


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: FTP Uploader script [message #411679 is a reply to message #411678] Fri, 20 November 2009 20:49 Go to previous messageGo to next message
Hex is currently offline  Hex
Messages: 858
Registered: March 2004
Karma: 0
Colonel
What do you have done of the scripts/functions so far?

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. Razz
Re: FTP Uploader script [message #411694 is a reply to message #411679] Sat, 21 November 2009 02:39 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

Hex wrote on Fri, 20 November 2009 21:49

What do you have done of the scripts/functions so far?

humm whats up at the top and all the errors i get....... and zunnie says i'm missing the .h code.


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: FTP Uploader script [message #411727 is a reply to message #411694] Sat, 21 November 2009 11:24 Go to previous messageGo to next message
Hex is currently offline  Hex
Messages: 858
Registered: March 2004
Karma: 0
Colonel
So you have done nothing but rip something from someone else's bot

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. Razz
Re: FTP Uploader script [message #411738 is a reply to message #411727] Sat, 21 November 2009 12:20 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

Hex wrote on Sat, 21 November 2009 12:24

So you have done nothing but rip something from someone else's bot

it's not in the bot so no i didn't rip it from someone else bot.

but yes i took it from the link reborn said..

And even if its in Yarr i have the source to it so it rlly would be riping...


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide
Re: FTP Uploader script [message #411744 is a reply to message #411355] Sat, 21 November 2009 13:20 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
Reading between the lines here, it looks like Sladewill based his plugin for ftp uploading on jnz's code. The actual download for this plugin has gone missing, and now Distrbd21 is trying to recreate some of the functionality of that plugin using the quoted code in Sladewill's post.


Re: FTP Uploader script [message #411747 is a reply to message #411744] Sat, 21 November 2009 13:39 Go to previous messageGo to next message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

reborn wrote on Sat, 21 November 2009 14:20

Reading between the lines here, it looks like Sladewill based his plugin for ftp uploading on jnz's code. The actual download for this plugin has gone missing, and now Distrbd21 is trying to recreate some of the functionality of that plugin using the quoted code in Sladewill's post.

thank you i couldn't think of away to say it.

i always piss someone off when i say stuff like that idk why Sarcasm


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide

[Updated on: Sat, 21 November 2009 13:39]

Report message to a moderator

Re: FTP Uploader script [message #411753 is a reply to message #411355] Sat, 21 November 2009 14:30 Go to previous messageGo to next message
reborn is currently offline  reborn
Messages: 3231
Registered: September 2004
Location: uk - london
Karma: 0
General (3 Stars)
I don't think you've pissed anyone off. I think there was some miss-placed feelings towards you, but really, any feeling should of been directed at Sladewill (if there is to be any at all).
Perhaps Sladewill should of mentioned jnz and where he got that code from out of respect, but really, none of this is your concern.
You're just here to try and get something working for your server, and I have a feeling that really you have no interest in annoying anyone...



[Updated on: Sat, 21 November 2009 14:30]

Report message to a moderator

Re: FTP Uploader script [message #411762 is a reply to message #411355] Sat, 21 November 2009 15:20 Go to previous messageGo to next message
Lone0001 is currently offline  Lone0001
Messages: 2112
Registered: August 2006
Location: Ontario, Canada
Karma: 0
General (2 Stars)

Here's version 1 of Sladewill's SSGM FTP Uploader plugin.

[Updated on: Fri, 12 February 2010 09:42]

Report message to a moderator

Re: FTP Uploader script [message #411776 is a reply to message #411762] Sat, 21 November 2009 17:44 Go to previous messageGo to previous message
Distrbd21 is currently offline  Distrbd21
Messages: 743
Registered: September 2008
Karma: 0
Colonel

Lone0001 wrote on Sat, 21 November 2009 16:20

Here's version 1 of Sladewill's SSGM FTP Uploader plugin.

ty, what program was this made in?

And where do i put my ftp info in at? all i have is ftpuploader.dll, stylesheet, and the pics.

am i supost to have a .ini file to?


Live Your Life Not Some one Else's.| Sharing Is Caring

http://dsgaming.us/distrbd21/Distrbd21%20siggy.png

Cookie Jar

Suicide

[Updated on: Sat, 21 November 2009 18:06]

Report message to a moderator

Previous Topic: !spy command help
Next Topic: Obelisk attack sequence
Goto Forum:
  


Current Time: Sun Dec 15 10:48:56 MST 2024

Total time taken to generate the page: 0.01361 seconds