( search forums )
Help Needed For Program!!!
Soldat Forums - Soldat Fans - Fan Apps
DePhille
July 9, 2004, 10:09 pm
As i'm creating aprogram to get a complete server list of the soldat obby , i need t know this:

what is the command to get the list? i've already connected to the server and tried 'servers' but i got disconnected then.

Plz help me

grtz , DePhille , A Programmer

N1nj@
July 9, 2004, 10:13 pm
http://lobby.soldat.pl:13073/ ?

Alamo
July 9, 2004, 10:14 pm
yeah... request that and parse your servers ;)

peemonkey
July 9, 2004, 10:28 pm
what proggy is you made-ing?

Element_101
July 10, 2004, 9:38 am
I think this post needs to be edited for gramma.

b00stA
July 10, 2004, 1:29 pm
Yep, parsing the lobby web frontend (http://lobby.soldat.pl:13073) is quite easy, I did it with the old and the current one.
DePhille, I have one tip:
When you request the lobby list, SAVE all servers in a temporary list (unlike Soldat.exe which has to request it each time you change the filter). Now when you change a filter, just reload the list from the memory, WITHOUT requesting it from lobby.soldat.pl
Saves a decent amount of time AND bandwidth (an "Update" button should still be there though :)

Edit: errr, I hope you understand what I mean..

DePhille
July 11, 2004, 5:46 pm
well boosta , i will.But what i ment is:
If any of u know programming a bit: i'm using the winsock contro lto connect to lobby.soldat.pl:13073 . I had a connection established , but i need a command like 'getservers' to receive the servers.I know how to create an FTP client but the FTP commands are not working.I think getting the server list this way is much faster and better than getting servers out of the HTML page. Like that i can show no. of bots and such things.(think so).

But the commands could be anything so ,i'm asking it here :p.


Grtz , DePhille.

b00stA
July 11, 2004, 6:32 pm
quote:Originally posted by DePhille
i'm using the winsock contro lto connect to lobby.soldat.pl:13073 .
As far as I know, the data Soldat.exe requests is sent via another port (UDP, not TCP?), so in order to request the stuff the same way Soldat.exe does, run a packet sniffer or something like that.
Since Michal didn't publish the protocol for it, better stick to the HTML parsing:

quote:I think getting the server list this way is much faster and better than getting servers out of the HTML page. Like that i can show no. of bots and such things.(think so).
You CAN filter the amount of bots from the web page front end (check the legend at the bottom of the page. players: number playing/max players (+number of bots)).
The command to request it via the HTTP protocol is (it's minimal/not perfect, but it works):
[code]sockwrite -n $sockname GET / HTTP/1.1
sockwrite -n $sockname Host: http://lobby.soldat.pl/ $+ $str($crlf,2)[/code]
This is mIRC script.. so you will have to write it in whatever language you're programming.
First connect to the server on port 13073, when connected, send the above data, where "sockwrite -n $sockname" is mIRC's command to send data to the server with a CRLF (carriage return/line feed) appended (important).
basically, you just send
[code]
GET / HTTP/1.1
Host: http://lobby.soldat.pl/[/code]

where the first line has one CRLF at the and and the second either 2 or 3, probably doesn't matter.
Now you receive some confirmation stuff, the server OS, etc. and then the HTML. To make sure that the server automatically closes the connection afterwards (should already happen, but who knows), add this line after the GET command:
Connection: close

that's basically all I know about HTTP commands, so if you need any other information, google has a lot of links to RFCs :)

DePhille
July 13, 2004, 9:04 pm
Lol , i'll think i'll do the HTML parsing...
But , then how does ASE do it?or is it another server (games wich are listed in soldat lobby are also listed in ASE) ?

Grtz , DePhille

b00stA
July 13, 2004, 9:50 pm
Totally forget about ASE, they have their own server and a closed protocol (ASEQuery_soldat.dll in your Soldat directory) and they apparently don't want it to leak.

DePhille
July 15, 2004, 11:46 am
lol , THX.I think i'm going to finish my stats program (soldat manager stats 3.0) first , then maybe the list program.

Grtz , DePhille