Donations
|
If you wish to make a donation you can by clicking the image below.
|
|
|
|
25th October, 2007, 01:31 PM
|
Killing Spree
|
|
Join Date: Oct 2007
Posts: 41
|
|
Global Stats (API?)
The biggest news today were the Global stats hosted by Enemy Down, are they hosting officially the Stats or do they just use an interface to another Server from Epic or more probable at GameSpy?
Probably they use the Interface also used by the Leader-Board in UT3 right? anyone has already some information or do I need to start up wireshark?
the ED site:
http://www.enemydown.co.uk/game.php?gameselect=UT3
Too overloaded this site...
|
26th October, 2007, 12:21 AM
|
Killing Spree
|
|
Join Date: Oct 2007
Posts: 41
|
|
I started a bit with wireshark, if you don't want to start from scratch you can read my analysis I did here: (its probably more than you need in the end) http://download.apophis.ch/UT3/globalstats/debug.txt
I cannot make my own calls yet, however I see what happens, the Statistics get queried from ut3pcd.sake.gamespy.com but it looks like you have to login first to get two things, a "Ticket" and a secret Key. You get the ticket when you login in the game, I have no clue where the secret key comes from. The XML description only mentions the ticket, maybe this is enough! I'll try later.
If you have that information, you can do Soap Calls to the StorageServer here: http://ut3pcd.sake.gamespy.com/SakeS...ageServer.asmx
The answers are quite boring, you get big xml answers with plenty of "RecordValues" with different type (string, int, binary) and not much description. Its plaintext and you can compare with your stats so it will be easy to find out when a Query gets an answer.
ffs is there no documentation from gamespy about this?
|
26th November, 2007, 02:40 AM
|
Killing Spree
|
|
Join Date: Oct 2007
Posts: 41
|
|
Query Playerstats API
After some time a little update here, I did some research and thanks to Cruz I got the necessary information I needed to program an example client which queries directly Gamespy to get the information of the players.
The project is written in C# and works under .NET and Mono, the fast prototyping, and automation of the Writing of the proxy classes for the webservices made it very nice to develop.
This is quite sure the same method enemydown.co.uk uses, I tried to contact them, but I was faster with getting the info myself, and I want to make it easier for other interested people.
How it works:
we log in at gpcm.gamespy.com and get a valid user ticket (thats why we need a valid login)
then with this ticket we query a webservice at ut3pc.sake.gamespy.com, as described in the previous post. In principle this is all what we need.
The parameters needed can be obtained via WireShark, a little list is added to the client as well. For experimenting this should be enough.
I'm working on a web interface ( here) and if anybody is interested I will release a console client.
Thanks to Cruz and the author of gslist
PS: some admin can move this into the main area, since its not demo related anymore. TIA
Here you can download the Source:
To make it work: add a valid Account in the beginning of the Main Procedure. The Code is GPL.
gameSpyWebService.zip
PS: consult the Source Code I tried to document it understandable.
Last edited by apophis.ch : 26th November, 2007 at 02:42 AM.
|
30th November, 2007, 07:14 PM
|
Killing Spree
|
|
Join Date: Oct 2007
Posts: 41
|
|
Job finished
Ok I derived a console Program, works on .NET and Mono, tested on Windows Vista, XP SP 2 and Linux (x86, debian)
here you can download it:
its gpl, and I hope you have fun, here is the help for the Program (you get it with -h) ... I use it to get the stats on http://prx.apophis.ch/player.php which is a 60 minutes project so very rudimentary, but you see what you can do.
Code:
Usage:
ut3player.exe [-g <username> <pass>][Options]
Options:
-c --count Only get the count of records
-d <player> Part or Complete Name of player
-e <filter> Filter, containing fields (-f)
-f --fields <param> List field/coloumnames
all param All fields
main param Main Fields (3)
general param General fields
weapon param Weapon fields
vehicle param Vehicle fields
turret param Turret fields
-g <username> <pass> All queries to the GS Database need a valid login
-h --help This help
-l --limit <num> Get at most <num> records (10)
-n, --surround <num> Get surrounding entries (only use with -u)
-o, --offset <num> Order by column
-p, easy parsing, not for humans, no markup
-q, --query f1 f2 f3 Query Coloumns f1,f2,f3, for coloum names use -f
--q-all Query All fields
--q-main Query only 3 values per Records (*)
--q-general Query General Stats
--q-weapon Query Weapon Stats
--q-vehicle Vehicle fields
--q-turret Turret fields
-s, --sort <col> [a/d] Sort by column [ascending/descending] (ELO desc)
-u, --user <uid> ... Get data of certain user
-v, --verbose Debug information
--version Version information
Examples:
ut3player.exe -g <username> <pass> -d player
Lists all players with Nick containing 'player', and list their complete name, ownerid and row values
ut3player.exe -g <username> <pass> -f-all -u 1337
Lists all attributes from the user with id 1337
ut3player.exe -g <username> <pass> -q Nick -l 3 -s Pure_VehiclesDM_VEHICLEKILL_UTVEHICLE_GOLIATH_CONTENT d
This will give the three nicks which used the tank the most.
Console Program:
http://download.apophis.ch/UT3/ut3playerStats.exe
Source Program:
http://download.apophis.ch/UT3/gameSpyWebService.zip
So for me its finished
|
5th January, 2008, 07:08 PM
|
|
Killing Spree
|
|
Join Date: Jan 2006
Posts: 18
|
|
Hey apophis.ch... nice work on this, you know your stuff.
Hoping you can help me get this working on my end. I downloaded the source, compiled without issue. Ran it supplying my username and password (that I use to login to the game) - the return was:
Quote:
The uniquenick provided is incorrect.
Webservice returned 'LoginTicketInvalid' instead of success.
|
Reading your posts and digging around a bit I realized I needed to supply my own secretKey and loginTicket to go with my username. I loaded up Wireshark and obtained both, here is part of what I pulled from Wireshark:
Code:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://gamespy.net/sake"><SOAP-ENV:Body><ns1:SearchForRecords><ns1:gameid>1727</ns1:gameid><ns1:secretKey>nT2Mtz</ns1:secretKey><ns1:loginTicket>nxzZEA6Sb7s[k[nA04kOMi__</ns1:loginTicket><ns1:tableid>PlayerStats_v2</ns1:tableid>
I updated secretKey(although this is the same as yours) and loginTicket in all locations in QueryCounts.xml and QueryRecords.xml in the source code files. Recompiled and ran - same result
Using Wireshark again I analyzed the soap packets when I ran your program. Here's what it's sending:
Code:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetRecordCount xmlns="http://gamespy.net/sake"><gameid>1727</gameid><loginTicket /><tableid>PlayerStats_v2</tableid><filter>NUM_Pure_PlayerDM > 0</filter><cacheFlag>false</cacheFlag></GetRecordCount></soap:Body></soap:Envelope>
Here's what I'm getting back:
Code:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetRecordCountResponse xmlns="http://gamespy.net/sake"><GetRecordCountResult>LoginTicketInvalid</GetRecordCountResult><count>0</count></GetRecordCountResponse></soap:Body></soap:Envelope>
Clearly it's not actually sending the secretKey and loginTicket...
Do you have any idea what I'm missing? Am I going about it the wrong way? I appreciate any help - thanks.
|
5th January, 2008, 10:01 PM
|
Killing Spree
|
|
Join Date: Oct 2007
Posts: 41
|
|
Hi,
The provided XML files in the source are not used in the program. They have been crucial for my development, and I included them as a reference for anyone who wants to develop anything with it.
If you want to check if its working you can try the precompiled version and try if it works. For myself it doesn't work with my ingame-id but it works with my regular GameSpy ID which was registered with GameSpy and not within ut3. But I am uncertain why its like that, it should work with my other ID as well.
You don't need to change anything, if it compiles it should work, and its more likely that your user ID and password are wrong.
the secret-key and loggin ticket will be calculated and/or received from the GameSpy Server by the program on runtime with your User ID and password. (the login ticket is only valid for some hours, or until you logout)
PS: yes its the error message you get if username or password is incorrect, and it looks like I have an uncached Null Pointer Exception there sorry! missed that one.
Last edited by apophis.ch : 5th January, 2008 at 10:05 PM.
|
8th April, 2008, 09:13 PM
|
Forum Newcomer
|
|
Join Date: Mar 2008
Posts: 8
|
|
This looks fantastic and I am hoping that I can add this to my site. I am using vb.net at the mo so it will be fun to get it working :-)
When its all up and running, due credit will be given
__________________
|
9th April, 2008, 09:49 PM
|
Killing Spree
|
|
Join Date: Oct 2007
Posts: 41
|
|
You're Welcome, if you want to use it from VB or from aspx best would be probably to compile it as a dll and use it via an interface. If you need help to do that in C# I can help you there.
Right now its quite some Work to make a usable Api from it.
Hope I can help
ut3.de uses it for the top 10... and BTW you can write quite complex queries with it, once I listed all players with a 10:1 or more Ratio in kills ;D so Cheater spotting could be a hobby with it
|
10th April, 2008, 06:17 AM
|
Forum Newcomer
|
|
Join Date: Mar 2008
Posts: 8
|
|
At the moment I am thinking of using it as a windows service to get the info I want and then dump that to a SQL database every half hour to an hour. My reasoning for this is using ut3.de and your demo front end it was not exactly quick (putting this down to gamespy) so I will essentially cache the info however it will refresh faster than ED
__________________
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
Thread Tools |
|
Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|