Forum

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

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

0 Members and 1 Guest are viewing this topic.

Jonnym

  • Guest
Re: AA25 Server UDP query
« Reply #15 on: Monday, April 23, 2012, 13:32:20 PM »
This...
Code: [Select]
$queryString = "getaaoid$playername";
Surely should be...
Code: [Select]
$queryString = "getaaoid"$playername;

Jonnym

  • Guest
Re: AA25 Server UDP query
« Reply #16 on: Monday, April 23, 2012, 13:34:47 PM »
spanky you could integrate this into s.aao25.com so when you click on a players name it querys for the id and takes you to their battletracker page.

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 #17 on: Monday, April 23, 2012, 13:44:04 PM »
There's many ways to do it in PHP, I think you're thinking of something like:
Code: [Select]
$queryString = "getaaoid" . $playername;
Personally, I would do it like this:
Code: [Select]
$queryString = "getaaoid{$playername}";Jared taught me about brackets and I prefer keeping everything inside the quotes rather than outside. You don't NEED the brackets, it just tells PHP that the text in the brackets is the variable.

Jonny, that idea might require some jQuery. I think both me and Graf are thinking about generating the ID when the page is loaded, that way links can be created directly to the persons account. So, at maximum there would be 32 or whatever queries in a second when the page is loaded.
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline pit-23

  • Loyal Member
  • ****
  • Posts: 760
    • View Profile
Re: AA25 Server UDP query
« Reply #18 on: Monday, April 23, 2012, 14:26:57 PM »
[...] Jonny will have to unblock servers or raise the max request amount.

Whitelist is not the way to go, as it should be possible to create tracker by anyone. Limits are necessary to prevent DOS. Therefore we should just extend query functionality, so that's its possible to create tracker without spamming the master server. First thing to do is possibility to query more players at once (or maybe its already possible by multiplicating the query string, i don't know).

I'll take care of this, just give me a little time to get acquainted with new stuff.
« Last Edit: Monday, April 23, 2012, 15:53:25 PM by pit-23 »

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 #19 on: Monday, April 23, 2012, 15:38:13 PM »
Look at you go Pit!
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 #20 on: Monday, April 23, 2012, 16:00:29 PM »
Hi.

Whitelist is not the way to go, as it should be possible to create tracker by anyone. Limits are necessary to prevent DOS. Therefore we should just extend query functionality, so that's its possible to create tracker without spamming the master server. First thing to do is possibility to query more players at once (or maybe its already possible by multiplicating the query string, i don't know).

I'll take care of this, just give me a little time to get acquainted with new stuff.

I guess the playername, ID, eg is stored in a database. Perhapds it is possbile to store these information in a seperate file periodicly or after each update on the web server, so this file can be used for a query? Like a rss-feed or banlist. So you don't have to worry about the auth-server and the number of replies...


To the code snipet a little earlier - you can use all of these:

Code: [Select]
$queryString = "getaaoid" . $playername;
$queryString = "getaaoid{$playername}";
$queryString = "getaaoid$playername";
$queryString = 'getaaoid' . $playername;


Regards
Graf

Jared

  • Guest
Re: AA25 Server UDP query
« Reply #21 on: Monday, April 23, 2012, 16:03:25 PM »
Why not have the assist server query the game servers every minute and store that into a db then we could write an API that the public could use?

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 #22 on: Monday, April 23, 2012, 16:16:19 PM »
If we were to have a database of ID's and usernames, might I suggest we toss a date column in there and clean out accounts that haven't been used in 30 days? i.e. banned ones and abandoned noob accounts so it doesn't clutter things up.

Just my useless contribution :)
It's like shaving your pubes to make your junk look bigger.
Might look bigger, but it aint.....

Offline BlueBlaster

  • Epic Poster
  • ******
  • Posts: 2,428
    • View Profile
Re: AA25 Server UDP query
« Reply #23 on: Monday, April 23, 2012, 16:49:47 PM »
Why not have the assist server query the game servers every minute and store that into a db then we could write an API that the public could use?

Sounds genius. Then you don't need to worry about querying too many times since you can pull a hell lot of info from a db through 1 query.



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 #24 on: Monday, April 23, 2012, 20:12:23 PM »
Actually, I just thought of a way to bypass the query spam problem. You don't link the usernames to Battletracker in the serverlist, you link them to another file with POST data (the username) which then sends a query to the Assist server, replies back with the BT ID and then a header redirect at the bottom. This way might be better too, because you wouldn't have to hook into an Assist API just to load the server list page, it would only talk to the Assist server if the web visitor actually clicked a name.
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 #25 on: Tuesday, April 24, 2012, 00:04:56 AM »
Hi all.

I think, we all talk about the same thing, even if my words were't the best to describe.

You also store the login IP in the auth database? So it would be possible to find a second account and build a account history...

I wouldn't delete accounts from db automatically. Let the infos in there, perhaps you need it sometimes...

Regards
Graf

Offline BiG_SerGiO

  • Administrator
  • Epic Poster
  • *
  • Posts: 2,232
  • "I got soul but i'm not a soldier..."
    • View Profile
    • Portuguese Warriors
  • AA: [PTwars]b!6
Re: AA25 Server UDP query
« Reply #26 on: Tuesday, April 24, 2012, 05:36:59 AM »
You also store the login IP in the auth database? So it would be possible to find a second account and build a account history...

I wouldn't delete accounts from db automatically. Let the infos in there, perhaps you need it sometimes...

Regards
Graf

This would be the best option since we don't know how long ACi History will be up, so this will be a way to users can still search and link accounts for AA 2.5
"Three things can not hide for long: the Moon, the Sun and the Truth"?
Hmm?

https://vortexservers.com/clients/aff.php?aff=406

Offline Graf

Re: AA25 Server UDP query
« Reply #27 on: Tuesday, April 24, 2012, 17:01:56 PM »
Hello all.

I did some work on my beta page (http://server-viewer.co.de/). Now the complete information given from AA25 is included. I'm still waiting for the possibility to get the Tracker-ID from Playername...  ;)

I'm only working on the Army 2.5 part at the moment. AA3 and BF2 are not updated yet. If you find any mistakes, errors, bugs, please report.

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 #28 on: Tuesday, April 24, 2012, 18:03:13 PM »
Check out my server.php that I sent you, specifically;
Code: [Select]
<?php
if($Info == "")
{
echo "Can't connect to server. Please try again.";
die();
}
?>

Your code doesn't fail gracefully:
Code: [Select]
Warning: fsockopen() [function.fsockopen]: unable to connect to udp://127.255.255.255:1717 (Permission denied) in /data/multiserv/users/760329/projects/1823153/www/includes/aa2_js_funktionen.php on line 5

Warning: fclose() expects parameter 1 to be resource, boolean given in /data/multiserv/users/760329/projects/1823153/www/includes/aa2_js_funktionen.php on line 15
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 #29 on: Wednesday, April 25, 2012, 13:42:27 PM »
Hi all.

Check out my server.php that I sent you, specifically;
(...)
Your code doesn't fail gracefully:

There was already a error handlig and now your special request to 127.255.255.255 also gives a "normal" error message.

-------------------------------------------

I really couldn't follow the content of the last two posts, don't know if they contain a joke or not, but my feeling is, that the one from "mans" isn't very polite. So I just ignore them and don't start a discussion about politically correctness or anything else

Regards
Graf

 

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