Forum

ASSIST, AMERICA'S ARMY COMMUNITY - RELIVE THE GLORY DAYS OF AMERICA'S ARMY 2.5

Author Topic: AA25 Server UDP query  (Read 9251 times)

0 Members and 1 Guest are viewing this topic.

Offline Graf

AA25 Server UDP query
« on: Sunday, April 22, 2012, 12:50:24 PM »
Hi all.

I'm working on a small project to query AA25 gameservers and give inormation on a webside, all done with php / html / java. It worked fine with 2.8.5, but now the PB Guids of the players are missing. I used the PB Guids for additional links to hazard account history and the battletracker.

The only unique Player ID at the moment seems to be the Battletracker ID. But with my UDP query I don't get it from the server. Is there a way to query a server without the assist to get the ID's from Battletracker, so I can link the online players to Battletracker and perhaps show their violation history?

If you want to know, what my project is, take a look here: http://server-viewer.co.de/ It's not running propper at the moment, I have to update the AA2 and AA3 querys. Perhaps someone of the AA25 developers can help me?

Regards
Graf

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: AA25 Server UDP query
« Reply #1 on: Sunday, April 22, 2012, 13:31:20 PM »
Hmmm, I'm trying to think of a way to grab BT ID's of players but I'm coming up empty. For the recently banned user, I have the BT ID and grab the username but that's reverse of what you want. Anyway, in the interest of sharing, I've uploaded the various user scripts I've written for this site, maybe there's something in there that can help you out.

http://dl.dropbox.com/u/464376/aac_maap/SpankyPHP.7z
If you do use something from my code, all I ask is a small credit somewhere :) I do have more scripts I've created for this site but I figured these would be the relevant ones for your use.
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Jonnym

  • Guest
Re: AA25 Server UDP query
« Reply #2 on: Sunday, April 22, 2012, 13:37:59 PM »
Yeah send a UDP query to auth.aa25.org:20047

to get ID for lord.anoobis:

send the following...
getaaoidlord.anoobis

will return....
aaoid811869
« Last Edit: Sunday, April 22, 2012, 13:43:45 PM by Jonnym »

Offline Graf

Re: AA25 Server UDP query
« Reply #3 on: Sunday, April 22, 2012, 14:19:48 PM »
Hello all.

Spanky, thanks for your code, but it's nearly the same I'm using. I don't know the correct words for it, but I try to explain: in "server.php" you are using a "numeric" array for the replies from the server, I use a "named" array. Part of the reply I get is:

Quote
[maxplayers] => 26
[gamemode] => 7.13
[password] => 0
[tour] => 11
[official] => 1
[leased] => 1
[nato] => 0
[miles] => 0
[cheats] => 0
[minhonor] => 10
[maxhonor] => 100
[groups] => ALL
[current_round] => 4/15
[mission_time] => 2:39
[sv_punkbuster] => 1
[tournament] => 0
[ultimate_arena] => 1
[thirdparty] => 1
[custom] => 1
[AdminName] => blala-Admin

You know, what the red highlighted parts are for? I Guess "ulitmate_areana" is "hack hunter", but I'm not sure...


Also thanks to Jonnym. That is something I looked for and I'll try it. Before I start to "spam" the AA25Auth-System, is there a limitation for requests per minute / hour?

Regards
Graf

Jared

  • Guest
Re: AA25 Server UDP query
« Reply #4 on: Sunday, April 22, 2012, 14:32:14 PM »
If I remember right when me and Nate did the server tracker deal assist alread cached them into a database so I think you would be fine to pull how every much u want

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: AA25 Server UDP query
« Reply #5 on: Sunday, April 22, 2012, 14:41:48 PM »
Gamemode is for the current Assist version, I know that. The others are probably a mix of Official Assist server, HackHunter and something else. Check around in all the scripts, I think there's a comment for the query that I put in where Jonny explained what all the values returned were.

Hmmm, looking around, I can't find where I put that.

As for queries, I wouldn't be concerned about query amounts. Think about the hundreds of Assist users that leave Assist running and the browser list refreshes in the background every 2 minutes or whatever it is. For this site, I query the player list every minute to gather data for the number of players in game.
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline Graf

Re: AA25 Server UDP query
« Reply #6 on: Sunday, April 22, 2012, 14:59:43 PM »
Hi.

My test worked, to get the ID --> http://server-viewer.co.de/aa25auth.php. But when I put it into my script to query a whole server with players, I didn't get an answer from AA25auth. I checked my test-file again and no answer returned. :-(

So when there is no automatically IP block in your auth, I have to ask my "test hoster", if there is a limitation...

Regards
Graf

Jonnym

  • Guest
Re: AA25 Server UDP query
« Reply #7 on: Sunday, April 22, 2012, 15:08:22 PM »
gamemode = Assist Version
thirdparty = hackhunter
ultimate_arena = 2.5Assist server
custom = AA25 Authorization required

There is a limit of 20 querys per 10 seconds, if you go over this you are blocked for 10 seconds. This is a form of DOS protection.

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: AA25 Server UDP query
« Reply #8 on: Sunday, April 22, 2012, 17:20:03 PM »
Graf, mind sharing the PHP code you used? I might integrate it into this site's server list if you don't mind.
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline august

  • Respected Members
  • Full Member
  • ***
  • Posts: 253
    • View Profile
  • AA: Avguste
Re: AA25 Server UDP query
« Reply #9 on: Sunday, April 22, 2012, 23:27:04 PM »
Great project idea.

Offline Graf

Re: AA25 Server UDP query
« Reply #10 on: Monday, April 23, 2012, 08:14:09 AM »
Hello all.

Thanks for your replies and the given information.

Graf, mind sharing the PHP code you used? I might integrate it into this site's server list if you don't mind.
It's the same you used in your uploaded example. Query a server via udp and list the results. I just have chosen a different way to display it. So I can't give you new information, you don't already have. I worked on this project since 4 years, as I saw in the copyright (I was really surprised about that long time). There is a lot of old parts in it, which will only confuse you. But perhaps I can help you if you can tell me, what you need special.

There is a limit of 20 querys per 10 seconds, if you go over this you are blocked for 10 seconds. This is a form of DOS protection.
Is there a way or possibility to set my web-server-ip on a white list, so it isn't blocked?


Another question to the dev team:
Is the "msgpbssv.html" automatically intergrated if the game-server takes screenshots? That is a more comfortabel screenshot viewer than the standard "pbsvss.htm" file.

Regards
Graf

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: AA25 Server UDP query
« Reply #11 on: Monday, April 23, 2012, 12:26:42 PM »
My test worked, to get the ID --> http://server-viewer.co.de/aa25auth.php.

Graf, I was talking about this :) I have no idea how to query with a specific string via UDP. Jonny will have to unblock servers or raise the max request amount.
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Jonnym

  • Guest
Re: AA25 Server UDP query
« Reply #12 on: Monday, April 23, 2012, 12:27:40 PM »
You seem to be forgetting, i dont run the servers anymore.

Offline Graf

Re: AA25 Server UDP query
« Reply #13 on: Monday, April 23, 2012, 13:11:14 PM »
Hi.

That part is no problem and also part of your code, but only with other adress:

Code: [Select]
<?php
$IP 
"auth.aa25.org";
$PORT 20047;
$sock fsockopen"udp://$IP"$PORT$errno$errstr0.5);
         if(
$sock)
                 {
                 
$playername "@-FMJ-@=Graf=";
                 
$queryString "getaaoid$playername";
                 
fwrite($sock$queryString);
                 
//Read response from server
                 
$Info = @fread($sock100);
                 
//Close the socket
                 
fclose($sock);
                 }

echo 
"Server response: $Info";
?>


Edit:
I used it in a function, so I splitted the query string and used variables for the IP and Port. You can put it together or rename it. It should work with single query for one user, but if you try to query a whole server at once, you'll also get the "ban" cause there are too many requests per second.

Regards
Graf
« Last Edit: Monday, April 23, 2012, 13:29:16 PM by Graf »

Offline Spanky

  • <?php echo $opinion .' is better.'; ?>
  • Administrator
  • Posts like a Spanky!
  • *
  • Posts: 10,893
    • View Profile
    • NatesComp.com
  • AA: tigobitties
Re: AA25 Server UDP query
« Reply #14 on: Monday, April 23, 2012, 13:27:30 PM »
You seem to be forgetting, i dont run the servers anymore.

*shifty eyes*

Thanks Graf :)
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

 

Download Assist

×

Download Game Client

Important: Battletracker no longer exists. However, old Battletracker accounts may still work. You can create a new 25Assist account here

Download Server Manager