Azərbaycan dili Bahasa Indonesia Bosanski Català Čeština Dansk Deutsch Eesti English Español Français Galego Hrvatski Italiano Latviešu Lietuvių Magyar Malti Mакедонски Nederlands Norsk Polski Português Português BR Românã Slovenčina Srpski Suomi Svenska Tiếng Việt Türkçe Ελληνικά Български Русский Українська Հայերեն ქართული ენა 中文
Subpage under development, new version coming soon!

Subject: »news XML Data Improvements

2013-06-07 21:12:30
Is there a way to get old data from sokker, by xml files?

like old reports or old transfers?
2013-10-26 23:23:44
The response received from the server when connecting to download the xml files contains the following message: "Table 'login_track' is marked as crashed and should be repaired" before the usual response.
This does not show when connecting from the xmlinfo.php page.
Are the devs aware of this issue?
If yes, when it will be solved?
2013-10-26 23:30:25
? no such problem for me.
2013-10-26 23:40:59
Do you set other options except the user and password when sending the request?

ps: login is successfull, just that it gives that extra error message.
2017-08-30 22:14:39
Hi, I want learn how to download info to the xml files but I can't
I try this in php with function curl and it's work, I get the answer OK teamID=29016 (my team in this case)

The problem is that I don't know how generate the xml files, in web proof it's ok but in the application I can't move fordward.
I try with this function but is not work. I would appreciate any help.

$xml = simplexml_load_file('http://sokker.org/xml/team-29016.xml');
2017-08-31 15:06:31
for anyone that is interested to work with the xml here is piece of code in php to connect and get players data

$ilogin = "yourlogin";
$ipassword ="yourpassword";

//echo chdir(getcwd());
$file_path = 'cookies.txt';
$ourFileHandle = fopen($file_path, 'w') or die("can't open file");
fclose($ourFileHandle);
chmod($file_path,0777);


// INIT CURL
$ch = curl_init();

// SET URL FOR THE POST FORM LOGIN
curl_setopt($ch, CURLOPT_URL, 'http://sokker.org/start.php?session=xml');

// ENABLE HTTP POST
curl_setopt ($ch, CURLOPT_POST, 1);

// SET POST PARAMETERS : FORM VALUES FOR EACH FIELD
curl_setopt ($ch, CURLOPT_POSTFIELDS, 'ilogin='.$ilogin.'&ipassword='.$ipassword);

// IMITATE CLASSIC BROWSER'S BEHAVIOUR : HANDLE COOKIES
curl_setopt ($ch, CURLOPT_COOKIEJAR, $file_path);

# Setting CURLOPT_RETURNTRANSFER variable to 1 will force cURL
# not to print out the results of its query.
# Instead, it will return the results as a string return value
# from curl_exec() instead of the usual true/false.
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);

// EXECUTE 1st REQUEST (FORM LOGIN)
$store = curl_exec ($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);

$resp = explode("\n\r\n", $store);
$header = explode("\n", $resp[0]);

if ($httpCode==200){
echo "Coonected to sokker.";
}else{
echo "Coonection to sokker failed :(";
exit;
}
//sleep(2);

if (isset($header[0])){
$tmp_arr = explode('teamID=',$header[0]);
}else{
echo "Wrong data!";
exit;
}
if (isset($tmp_arr[1]) && $tmp_arr[1]>0 && $tmp_arr[1]!=''){
echo "You are logged to sokker :";
$t_sokker_id= $tmp_arr[1];

}else{
echo "Wrong data !";
exit;
}
2017-08-31 15:08:43
once connected you can get data from xml service like this


$url="http://sokker.org/xml/player-".$pid.".xml";
curl_setopt($ch, CURLOPT_URL, $url);
$content_player = curl_exec ($ch);
$player_xml= new SimpleXMLElement($content_player);
2019-07-02 23:47:19
once connected you can get data from xml service like this


$url="http://sokker.org/xml/player-".$pid.".xml";
curl_setopt($ch, CURLOPT_URL, $url);
$content_player = curl_exec ($ch);
$player_xml= new SimpleXMLElement($content_player);


I did a test and this request return "true"... somebody??
2019-07-03 14:50:08
You are missing this:
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
2020-01-29 23:13:58
there are any chances for this api to be extended?
2020-01-29 23:31:49
Doubth so but it gives pretty much all u need
2020-01-30 10:38:09
indeed, but I was hoping we can do, in the future, some post requests too. Or to scan the transfer list :)))
2020-04-14 11:04:40
Hello,

I wonder how to get the leagueID of a team from xml files.

Does anybody knows ?

Also, what is the reports.xml's purpose ?

Thanks !
2020-04-14 11:44:27
I think it could be get from matches-team-[team-id].xml where date is Sunday and round is adequate
2020-04-14 12:45:02
What do you mean "round is adequate" ?
Where the round is 6 ?

All over the sokker world, matchs league are on sundays ?
(edited)
2020-04-14 12:58:47
6 is adequate round, because league matches are in rounds 1-14, so all except 15 or 16 are adequate (or maybe 14 and 15, it depends it they start with 0 or 1), means are league games, not cup, not friendlies, in case of cup the leagueID will be different

instead of looking for exact sunday choose record where day=1
maybe check vars also there is current weekday in sokker (3 now) and current season or something, dont remember

generally, it might need some combinations and might be a little unclear between seasons but you should be able to figure it out basing on the info