You are an unregistered user, you can register here
Navigation

Information

Site

Donations
If you wish to make a donation you can by clicking the image below.


 
Go Back   The Unreal Admins Page > Forums > Unreal Admins > Unreal Tournament 3 > UT3 Server - General Chat

Reply
Thread Tools Display Modes
  #1  
Unread 29th November, 2007, 09:02 AM
LizardKing LizardKing is offline
Dominating
 
Join Date: Dec 2005
Posts: 105
Default PHP Server Query

Hi folks, I've tried using the PHP script that's on the UT3 wiki here, but can't get it working. It seems that it connects to the server, but doesn't get a response. Has anyone tried it & got it working? I know that I have the right port & information sends, as I've got qstat working.

Thanks
__________________
CrookedCannon - [FnG] Public TDM 16 player UT3 server
Reply With Quote
  #2  
Unread 30th November, 2007, 02:36 PM
Rewind{KDS} Rewind{KDS} is offline
Forum Newcomer
 
Join Date: Jun 2004
Posts: 11
Default

AFAIK, there are some issues with queries sent to UT3 Dedicated Servers.

Servers that are on tracking sites such as GameTracker or Qstat based status updates disappear from the client browsers after a few map rotations. Then, the query tool/servers will show the server status as offline.

However, if you check your dedicated server, the game server appears to be running normally. Just, no one can see the server so it will be empty. The fix for these "missing" servers is to stop/restart the game server. Then, all will be fine for a "awhile".

Game Tracker had one of my Pub Warfare servers added to their tracking tables. Since I didn't add the server, I could not delete it. Their method of re-claiming a server as your own requires the server's name to be changed to GameTracker. Then, you claim the server, after which, you can reset the name back. However, with the current Dedicated Server, the servername is prefixed with the Gamespy login account.

I posted on GameTracker about my issues - However, the forum admin/moderator deleted my posts. So, I have no clue if they are addressing this. My suggestion was to disable UT3 tracking until the dedicated server has been updated/patched to resolve this.

I understand that the next beta patch will fix this. But, the beta patch is not available to everyone.

Just a heads up...
Reply With Quote
  #3  
Unread 1st December, 2007, 03:33 PM
apophis.ch apophis.ch is offline
Killing Spree
 
Join Date: Oct 2007
Posts: 41
Default

Hi,

The Code displayed on the wiki is in principal working. Here you can download my example code, and how to use it:

Its a simple class which does the Querying for you, in the example.php you can see how you can use it. You need simple knowledge of how to use classes and arrays.

PHP class + example:
http://download.apophis.ch/UT3/Ut3ServerQuery.zip

Here you can see how the example should look like if you use it:
http://download.apophis.ch/UT3/example.php

And here you can see what I've done with the class (and some more):
http://prx.apophis.ch/viewer.php

There are no real querying issues, I query all the servers in a regular intervall and they answer all very smoothly!

New since Server Patch 1: new field probably mutator field, the skill field gets the average skill of the players on the server.
Still missing: Players playing on a server...

Last edited by apophis.ch : 1st December, 2007 at 10:29 PM.
Reply With Quote
  #4  
Unread 1st December, 2007, 05:01 PM
LizardKing LizardKing is offline
Dominating
 
Join Date: Dec 2005
Posts: 105
Default

Those links run, as opposed to offering download? Maybe save it as just a .txt
__________________
CrookedCannon - [FnG] Public TDM 16 player UT3 server

Last edited by LizardKing : 1st December, 2007 at 05:03 PM.
Reply With Quote
  #5  
Unread 1st December, 2007, 10:29 PM
apophis.ch apophis.ch is offline
Killing Spree
 
Join Date: Oct 2007
Posts: 41
Default

I am sorry I zipped it... link above
Reply With Quote
  #6  
Unread 2nd December, 2007, 10:38 AM
athos's Avatar
athos athos is offline
Dominating
 
Join Date: Jun 2004
Location: FRANCE
Posts: 114
Default

Quote:
Originally Posted by apophis.ch View Post
Still missing: Players playing on a server...
I wonder if we are going to have this?
__________________


Reply With Quote
  #7  
Unread 2nd December, 2007, 01:37 PM
LizardKing LizardKing is offline
Dominating
 
Join Date: Dec 2005
Posts: 105
Default

Was this written for php 5? Can't get it to run, I'm using php 4.4.4 I think. I'll keep playing with it
__________________
CrookedCannon - [FnG] Public TDM 16 player UT3 server
Reply With Quote
  #8  
Unread 2nd December, 2007, 04:57 PM
apophis.ch apophis.ch is offline
Killing Spree
 
Join Date: Oct 2007
Posts: 41
Default

Good question maybe we need a mutator for that one... I will support an official or an unofficial solution to the "Who is on the Server" question.

Well indeed its developed for PHP5 since it is using constructors and there is even a rudimentary toString in it.

maybe you want to try to convert the code automatically, with a script like this: http://www.dgx.cz/tools/php-5to4/
Reply With Quote
  #9  
Unread 2nd December, 2007, 08:45 PM
Sargon Sargon is offline
Rampage
 
Join Date: Sep 2003
Posts: 76
Default

Cruz's script here does indeed work.

http://www.penetrate.nl/ut3serverquery.phps

I made a couple small changes for me, you can see the results here.
nothing fancy, I just needed the output for my gscp for gamerzunlimted.
I use 6500 for my queryport on our servers. Also needed to add the missing gametypes.

http://64.27.13.29/ut3query/query.ph....27.13.35:6500
Reply With Quote
  #10  
Unread 5th December, 2007, 04:00 PM
athos's Avatar
athos athos is offline
Dominating
 
Join Date: Jun 2004
Location: FRANCE
Posts: 114
Default

I don't want to believe epic has released the game without players querying... even gametracker has no stats
__________________


Reply With Quote
  #11  
Unread 6th December, 2007, 09:26 PM
Piglet Piglet is offline
Holy Shit!!
 
Join Date: Aug 2004
Location: UK, South, Middle
Posts: 625
Default

* Piglet mutters

The linux install I'm on doesn't have bcmath or the library for the socket functions you use. I redid the socket stuff using standard fsockopen() etc - but I'm at a loss to know what's the best way round the missing bcmath

Bother!
__________________
Dogsbody at Miasma: Berserk Warfare (ONS and vCTF), Custom Freon, TAM, iCTF
Previously Admin at Titan Internet UK UT2004 Servers: (32 player ONS, Freon, RPG CTF)
Reply With Quote
  #12  
Unread 6th December, 2007, 09:42 PM
PizzaMan's Avatar
PizzaMan PizzaMan is offline
Holy Shit!!
 
Join Date: Jun 2004
Location: Bergen - Norway
Posts: 2,389
Default

Quote:
Originally Posted by athos View Post
even gametracker has no stats
From their site:

Quote:
Player stats not supported by this game.
Reply With Quote
  #13  
Unread 8th December, 2007, 12:03 PM
apophis.ch apophis.ch is offline
Killing Spree
 
Join Date: Oct 2007
Posts: 41
Default

Quote:
Originally Posted by Piglet View Post
* Piglet mutters

The linux install I'm on doesn't have bcmath or the library for the socket functions you use. I redid the socket stuff using standard fsockopen() etc - but I'm at a loss to know what's the best way round the missing bcmath

Bother!
The script by cruz doesnt use BCMath, he does use direct bit manipulation, but I havent redone mine cause I dont like bitmanipulating in PHP since you never know with what type you are actually working on. Statically typed languages have their merits.

but there are no unsigned ints :/ in PHP and BCmath is included in PHP since PHP4 if you need direct help, ping me on IRC.
Reply With Quote
  #14  
Unread 16th December, 2007, 10:43 PM
HTM|Minion's Avatar
HTM|Minion HTM|Minion is offline
Killing Spree
 
Join Date: Jul 2004
Posts: 26
Default

I too have looked everywhere for server status monitoring code. I like map images, so "gametracker" seemed to be ok, but the information was updated like every five minutes which to me is basically useless. Besides I hate to advertise for places just to show server status. I found one that used to be part of a "phpnuke" module called LGSL that updates more to my liking.

LGSL has been released as a standalone version. Although player name support is lacking (But that's the game's issue, do you see names in the game's own browser yet? Until it's there no third party monitor is going to show it IMO) it provides a map images and number of players on the server. I use it in our site's sidebar and it has configurable update intervals. The example below has been tweaked and simplified for my site's needs, the original "module" code offers more info.

Example Block

Example of Index Page (click server name for detailed server info)

Link to LGSL
Reply With Quote
  #15  
Unread 17th December, 2007, 03:59 PM
Xenos Xenos is offline
Rampage
 
Join Date: Sep 2002
Location: USA.gif
Posts: 56
Default

Does qstat v2.8 support the gs protcol for UT3 or is there an updated version floating around?
__________________
UnrealMachine.Com
Reply With Quote
  #16  
Unread 18th December, 2007, 11:22 PM
apophis.ch apophis.ch is offline
Killing Spree
 
Join Date: Oct 2007
Posts: 41
Default

My qstat tells me it is qstat 2.11 and works fine with UT3
Reply With Quote
  #17  
Unread 29th December, 2007, 11:47 PM
B3rt B3rt is offline
Forum Newcomer
 
Join Date: Feb 2006
Posts: 13
Default

Does anyone know how to extract player details such as player name score, score etc...
Reply With Quote
  #18  
Unread 29th December, 2007, 11:53 PM
Sargon Sargon is offline
Rampage
 
Join Date: Sep 2003
Posts: 76
Default

Quote:
Originally Posted by B3rt View Post
Does anyone know how to extract player details such as player name score, score etc...
You can't, the game does not seem to send out that info for anyone to query.
Reply With Quote
  #19  
Unread 1st April, 2008, 02:58 PM
windaishi windaishi is offline
Forum Newcomer
 
Join Date: Apr 2008
Posts: 1
Default

hi,

i have a problem with receiving the of my UT3 server. If I send the first packet (FE FD 09 01 02 03 04 FF FF FF 01) the only response is 00.
Here a small script which shows what i mean:
PHP Code:
<?php
$con 
fsockopen("udp://localhost"6400$errno$errstr);
fwrite($consprintf("%c%c%c%c%c%c%c%c%c%c%c"0xFE0xFD0x090x010x020x030x040xFF0xFF0xFF0x01));
$resp fgets($con);
echo 
ord($resp);
fclose($con);

// Display: 0
?>
And yes, my queryport is 6400
Reply With Quote
  #20  
Unread 26th July, 2008, 09:11 AM
everyone's Avatar
everyone everyone is offline
Forum Newcomer
 
Join Date: Aug 2005
Location: germany
Posts: 14
Default

Edit *** Solved! :-)

Last edited by everyone : 29th August, 2008 at 10:00 AM. Reason: Solved
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:28 AM.


 

All pages are copyright The Unreal Admins Page.
You may not copy any pages without our express permission.