Calling all PHP Programmers

Discuss the campaign and all things BF.

Moderator: Executive

cairdazar
Supporting Member
Supporting Member
Posts: 555
Joined: Mon Feb 13, 2012 4:24 am
Location: sweden

Re: Calling all PHP Programmers

Post by cairdazar »

I poked around a bit more in battlelog and I can get the soldier id [1] of the players on a server.
Using the same api call as the browser make, then one clicks the see all players link on a server page.

That should be unique and good enough for your purposes. This way we don't have to put any extra load on your servers.

The only obvious cases I can think of where there will be problems is if a player have multiple soldiers and/or account or if some one changes there account . But that will happen with the guid as well.

Will log the soldier id from now on.

--
Cair

[1] as in http://battlelog.battlefield.com/bf3/soldier/<username>/stats/<soldierid>/
the username is irrelevant, any string will do, for the link to work
Image
Image
Image
styphon
Supporting Member
Supporting Member
Posts: 3514
Joined: Mon Jul 20, 2009 8:23 pm
Location: *Classified*

Re: Calling all PHP Programmers

Post by styphon »

Unfortunately not. The soldier ID is simply a number from 1 - 64 assigned to a player on the server at the time. It has no correlation to the player once they leave the server and can't be used to track stats across time. It has to be the PB or EA GUID.
Image
cairdazar
Supporting Member
Supporting Member
Posts: 555
Joined: Mon Feb 13, 2012 4:24 am
Location: sweden

Re: Calling all PHP Programmers

Post by cairdazar »

styphon wrote:Unfortunately not. The soldier ID is simply a number from 1 - 64 assigned to a player on the server at the time. It has no correlation to the player once they leave the server and can't be used to track stats across time. It has to be the PB or EA GUID.
I think we are talking of different soldierIds.

The id I get from battlelog (also called personaId) is bound to a particular soldier (persona), and that is in turn bound to a battlelog/ea/origin account.

My soldierid is 367699479 and my userid is 2832660143776972894 for example, nether is a proper guid, but still unique.

Is that any clearer?
Image
Image
Image
styphon
Supporting Member
Supporting Member
Posts: 3514
Joined: Mon Jul 20, 2009 8:23 pm
Location: *Classified*

Re: Calling all PHP Programmers

Post by styphon »

Yea, that's clearer. Can people find out their own soldier ID easily?
Image
cairdazar
Supporting Member
Supporting Member
Posts: 555
Joined: Mon Feb 13, 2012 4:24 am
Location: sweden

Re: Calling all PHP Programmers

Post by cairdazar »

styphon wrote:Yea, that's clearer. Can people find out their own soldier ID easily?
Yes, by clicking a stats link on battlelog (while logged in) the soldier id is the numbers at the end.

My stats link is http://battlelog.battlefield.com/bf3/soldier/cairdazar/stats/367699479/ and my soldier id is 367699479
Image
Image
Image
Ash2Dust
Executive
Executive
Posts: 4797
Joined: Mon Jul 20, 2009 8:23 pm
Location: California

Re: Calling all PHP Programmers

Post by Ash2Dust »

cairdazar wrote:
styphon wrote:Yea, that's clearer. Can people find out their own soldier ID easily?
Yes, by clicking a stats link on battlelog (while logged in) the soldier id is the numbers at the end.

My stats link is http://battlelog.battlefield.com/bf3/so ... 367699479/ and my soldier id is 367699479
People can easily find their Origin name. They just need to make sure they spell it exactly like they do in game. That would allow the database to attach their soldier id to them. What happens when they change Origin ID? Have it merge the old id into the new one? dunno, but would be more of a wish list item?
styphon
Supporting Member
Supporting Member
Posts: 3514
Joined: Mon Jul 20, 2009 8:23 pm
Location: *Classified*

Re: Calling all PHP Programmers

Post by styphon »

Ash2Dust wrote:
cairdazar wrote:
styphon wrote:Yea, that's clearer. Can people find out their own soldier ID easily?
Yes, by clicking a stats link on battlelog (while logged in) the soldier id is the numbers at the end.

My stats link is http://battlelog.battlefield.com/bf3/so ... 367699479/ and my soldier id is 367699479
People can easily find their Origin name. They just need to make sure they spell it exactly like they do in game. That would allow the database to attach their soldier id to them. What happens when they change Origin ID? Have it merge the old id into the new one? dunno, but would be more of a wish list item?
Names can be changed, but the ID is fixed to the account (or should be, the GUID is so if the soldier ID isn't use the GUID). We need to use the most unique and permanent ID possible.
Image
Ash2Dust
Executive
Executive
Posts: 4797
Joined: Mon Jul 20, 2009 8:23 pm
Location: California

Re: Calling all PHP Programmers

Post by Ash2Dust »

Could also take the PB logs from each server and put them thru some sort of filter.
It associates each name with a PB GUID when they connected and when they disconnected.
styphon
Supporting Member
Supporting Member
Posts: 3514
Joined: Mon Jul 20, 2009 8:23 pm
Location: *Classified*

Re: Calling all PHP Programmers

Post by styphon »

That's not a bad idea. Are they available via FTP? If not someone would have to do it manually.
Image
cairdazar
Supporting Member
Supporting Member
Posts: 555
Joined: Mon Feb 13, 2012 4:24 am
Location: sweden

Re: Calling all PHP Programmers

Post by cairdazar »

First try on automatic roster, http://bf3.herokuapp.com/gc/roster

Its a list of origin usernames that was on the eu and/or the new york server during the battleday hours (5 min, resolution).

Currently it is hit, ki and ta mixed, will try to split the users up later.

I have the ki users in a google docs spreadsheet, is there any corresponding list for hit?

Appreciate if some one can look at it for any errors.
Image
Image
Image
BRUMMIE
Senator
Senator
Posts: 2293
Joined: Mon Jul 20, 2009 8:23 pm

Re: Calling all PHP Programmers

Post by BRUMMIE »

Sorry, I was so in awe of the first name on the list I couldn't look at the others. Interesting :) Glad to see you guys working at this though and thanks.
madcow
Executive
Executive
Posts: 3561
Joined: Mon Jul 20, 2009 8:23 pm

Re: Calling all PHP Programmers

Post by madcow »

That's awesome Cairdazar!

Being able to poll the servers to see who's playing is certainly useful for ABC.
Image
Clicky to become a Voteable member.

“…so realistic, it'll have you picking shrapnel out of your backside.”
Shrapnel
Supporting Member
Supporting Member
Posts: 3273
Joined: Mon Jul 20, 2009 8:23 pm
Location: San Diego, CA

Re: Calling all PHP Programmers

Post by Shrapnel »

Great work Cair! This will certainly help with some of the HC admin stuff. Thank you. :)
[sig]Broken due to link being older than I am (in internet years at least) and laziness[/sig]
Shrapnel
Supporting Member
Supporting Member
Posts: 3273
Joined: Mon Jul 20, 2009 8:23 pm
Location: San Diego, CA

Re: Calling all PHP Programmers

Post by Shrapnel »

Just went through your list and compared it to our scoreboard screenshots last night. I'm not sure how often you polled the server but I found three names were missing from KI's attendance. I didn't do a compare to see if anyone was on there that we didn't have in screens.

Just FYI for troubleshooting.
[sig]Broken due to link being older than I am (in internet years at least) and laziness[/sig]
Ash2Dust
Executive
Executive
Posts: 4797
Joined: Mon Jul 20, 2009 8:23 pm
Location: California

Re: Calling all PHP Programmers

Post by Ash2Dust »

We need to poll every 15 minutes or so without spamming servers. People could possibly slip thru if they are on less than that time frame.

I'm not on the list either, I was on the NA server all day to keep an eye on NY server performance.

Can do server logs, but that would need manual interaction each week.

We should probably avoid scrapping TS. The TS server was spiking 100% CPU usage every few minutes.
Post Reply