Major problems with pulling info from external source.

Hey guys -

Been trying for days to get some code working that has worked for me the past couple of years, however this year the external source has changed up some stuff.

I’ll try and explain as well as provide some examples of whats happened, although its quite complicated for me as my coding is not the best I’m sure that someone will look at it and figure it out but its really been bugging me…

Anyway, I run a semi competitive FIFA forum for 11v11 Pro clubs on the EA Sports game FIFA, each year (since FIFA15) I have taken stats from the teams registered on our forum straight from EA into a system we call rivals. The first year things worked perfectly then last year I had to do some patch up work and while not ideal I had it working, this year though EA have changed some parameters of how they put out the information.

So to give an example I take information from EA’s API in a nutshell all thats changed that affects me is the following.

This: “details”:{“blazeId”:185917395,“nucleusId”:2276726474,“personaName”:“JkE x BIONiiC x”,“platformName”:“xboxone”}},“202620047”:

Has changed to this:
“playername”:“Unity Zinho”},“PJhlj3yYWc0tfeSQl67_mQ!!:FE-Bey0QsKhY0YpvUvEaxA!!”:

Player name and PersonaName are the same thing, the problem I had here is I need the players EA ID as well this is where I link my xenforo forum accounts into the players stats etc that is pulled from the EA website. The blaze ID does exist in another location but this info is pulled from matches: https://www.easports.com/iframe/fifa17proclubs/api/platforms/XBOXONE/clubs/57562/matches this link is my own club however information can also be found on the club members page: https://www.easports.com/iframe/fifa17proclubs/api/platforms/XBOXONE/clubs/57562/members

I have attached the main file which pulls all the data in the hope that someone can put me out my misery and help me find what is stopping me pulling the playersID down. When I run my cron which processes the matches I get a duplicate matchID which is because the player_ea_id is coming in as 0 when before it was the blazeID that was entered that is no longer there and is replaces by the long code after the playername on the updated EA page. Mysqli statement execute error : Duplicate entry ‘385871526-0’ for key ‘match_id’

Thanks for any help.


Rivals.txt (29.8 KB)

Sponsor our Newsletter | Privacy Policy | Terms of Service