Subpage under development, new version coming soon!
Thema: »news XML Data Improvements
Hi. I´m developing a tool for the NT manager.
I´m trying to get the xml of the Argentinean NT team (code 19) and the xml is returned with no data at all:
* I am doing something wrong or the data of the nt players can´t be obtained (just form, ntgoals and all that stuff that you can get for other teams)
* If it is not possible to get the data as a regular user (my user). Can the NT coach get this data of his own NT Team?
Thanks, i don´t know if this was already discussed
(Edith war hier)
I´m trying to get the xml of the Argentinean NT team (code 19) and the xml is returned with no data at all:
* I am doing something wrong or the data of the nt players can´t be obtained (just form, ntgoals and all that stuff that you can get for other teams)
* If it is not possible to get the data as a regular user (my user). Can the NT coach get this data of his own NT Team?
Thanks, i don´t know if this was already discussed
(Edith war hier)
Hi!
I'm trying to create a online tool for the Bulgarian NT. But I have a small problem.
I can't parse the XML file directly from sokker.org. What I mean...
Here is an example of a test site.
"Login" is for a session creating.
"FC Silent Thunder" shows the XML file of my team.
"My Players" shows the XML file of my players.
"XML on my server" is php script for parsing of the XML file located on my server.
"XML on sokker.org" is the same php script which trys to parse the same XML file but directly from sokker.org.
Have somebody an idea why it doesn't function? Thx.
I'm trying to create a online tool for the Bulgarian NT. But I have a small problem.
I can't parse the XML file directly from sokker.org. What I mean...
Here is an example of a test site.
"Login" is for a session creating.
"FC Silent Thunder" shows the XML file of my team.
"My Players" shows the XML file of my players.
"XML on my server" is php script for parsing of the XML file located on my server.
"XML on sokker.org" is the same php script which trys to parse the same XML file but directly from sokker.org.
Have somebody an idea why it doesn't function? Thx.
for app devs:
Do You catch such exception as not existing player in XML ?
e.g. player-1.xml ?
Do You catch such exception as not existing player in XML ?
e.g. player-1.xml ?
I'm trying to parse http://online.sokker.org/xml/player-1838145.xml
It's not a problem to parse the same file but saved on my server:
http://sokker.bg-manager.org/db/player-1838145.xml.
It's not a problem to parse the same file but saved on my server:
http://sokker.bg-manager.org/db/player-1838145.xml.
"XML on sokker.org" is the same php script which trys to parse the same XML file but directly from sokker.org.
Could you give more detail? Does the script wait for the whole XML to be loaded in memory before parsing?
Could you give more detail? Does the script wait for the whole XML to be loaded in memory before parsing?
You are not going anywhere with that script. You need to use Curl function to login (setting a cookie) and then dowload the xml file, you can't read it directly. Once you stored the contenent in a variable you can parse it.
@LordGelu :
An example :
#! /bin/bash
#set -x
curl -c skcook -d "ilogin=ferdam&ipassword=xxxxxxx" http://online.sokker.org/start.php?session=xml -o /tmp/sk_ferdam_session
cat league.dat | awk -F',' '{print $1}'`| while read line
do
curl -b skcook -m 12 --retry 3 --retry-delay 3 "http://online.sokker.org/xml/league-$line.xml" -o xml/team_$line.xml
sleep 5
done
If you want more details about that, please tell me.
Ops ! I'm using Linux, I don't know about windows - sorry
(Edith war hier)
An example :
#! /bin/bash
#set -x
curl -c skcook -d "ilogin=ferdam&ipassword=xxxxxxx" http://online.sokker.org/start.php?session=xml -o /tmp/sk_ferdam_session
cat league.dat | awk -F',' '{print $1}'`| while read line
do
curl -b skcook -m 12 --retry 3 --retry-delay 3 "http://online.sokker.org/xml/league-$line.xml" -o xml/team_$line.xml
sleep 5
done
If you want more details about that, please tell me.
Ops ! I'm using Linux, I don't know about windows - sorry
(Edith war hier)
here is an exemple of cUrl use to donwload xml:
http://www.solina.it/sokker/code.txt
I use almost the same code in my site
http://www.solina.it/sokker/code.txt
I use almost the same code in my site
What have You noticed more in this XMLs is there any bugs or missing ?
Some match XMLs have invalid characters. For instance, in this game one of the tactic names is wrong and has a 0x1 character.
Some match XMLs have invalid characters. For instance, in this game one of the tactic names is wrong and has a 0x1 character.
Has anyone figured out yet what the tags "timePlaying" and "timeDefending" stand for? (in match-xxxx.xml)
If I divide "timePlaying" by 31698 I get the Off % of the player for that match, but this doesn't apply to the def%
:S
(Edith war hier)
If I divide "timePlaying" by 31698 I get the Off % of the player for that match, but this doesn't apply to the def%
:S
(Edith war hier)
I got the # by dividing each player's off # by the sums of all off %'s and doing the same
ie def1 / sum(def 1-11) is the % for player 1...
ie def1 / sum(def 1-11) is the % for player 1...
oh man, that 'd be TERRIBLE :S
why would the implement it in such a stupid way that the data on its own is useless...?!?
why would the implement it in such a stupid way that the data on its own is useless...?!?
The data is not useless.
See for example this match
The value given in timePossession tag for Charrúa Roots (my team) is 30642
This value represents possession (49%)... my part of the overall time played.
As you have noticed, if you sum all the values of the timePlaying tag of all the players of your team, you will get this same value (in my case, again 30642).
This means that the "Off. %" for each player of your team represents the weight of your player in the overall offensive (possessing) activity of your team. This is usefull data.
On the other hand, the sum of all the timeDefending tags of my players is 12152. The "Def. %" of each of my players represents their weight in the overall defensive activity of my team. This is also usefull data.
For example you can get from this data important information such as from what side of the field you where more frequently attacked.
See for example this match
The value given in timePossession tag for Charrúa Roots (my team) is 30642
This value represents possession (49%)... my part of the overall time played.
As you have noticed, if you sum all the values of the timePlaying tag of all the players of your team, you will get this same value (in my case, again 30642).
This means that the "Off. %" for each player of your team represents the weight of your player in the overall offensive (possessing) activity of your team. This is usefull data.
On the other hand, the sum of all the timeDefending tags of my players is 12152. The "Def. %" of each of my players represents their weight in the overall defensive activity of my team. This is also usefull data.
For example you can get from this data important information such as from what side of the field you where more frequently attacked.