ajbdev / phpsc2replay

Automatically exported from code.google.com/p/phpsc2replay
0 stars 1 forks source link

Server IDs for BNET Url's #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am posting my findings here in response to a discussion thread asking for a 
way to determine the bnet server #

Quote: 

Example, European server URL: 
http://eu.battle.net/sc2/eu/profile/203342/1/srsRAZERnAni/ 
Example Russian server URL 
http://eu.battle.net/sc2/eu/profile/160089/2/GrAsE/ 
The difference in URL here is "1" or "2" before player name. Is this info 
stored in replay? 
URL for 1st example: http://sc2rep.ru/show.php?id=1073 
URL for 2nd example: http://sc2rep.ru/down.php?id=1111 

=========================================
I am not 100% sure about this, but I am fairly confidant that the "server" 
identifier is located at $player[1][2]

I added the following to lines 213 of sc2replay.php to extract this information 
to be stored in the $playerArray

$p["server"] = $player[1][2];

This has worked for all the replays that I have been able to test so far. 

Original issue reported on code.google.com by Lru...@gmail.com on 9 Sep 2010 at 3:26

GoogleCodeExporter commented 8 years ago
Will be added to the repository on next commit.

Original comment by lauri.vi...@gmail.com on 14 Sep 2010 at 6:19

GoogleCodeExporter commented 8 years ago
Confirm. I checked all my RU/EU replays: $player[1][2] returns 1 on EU and 2 on 
RU 

Original comment by sMKInGh...@gmail.com on 27 Sep 2010 at 8:26

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Fixed, the numeric value is now available under player array index "uidIndex" 
(has been for a while, forgot to close the ticket).

Original comment by lauri.vi...@gmail.com on 24 Oct 2010 at 7:13