Subpage under development, new version coming soon!
Asunto: »news XML Data Improvements
BlueZero para
ephixe [del]
try something like this:
curl_setopt($ch, CURLOPT_URL,"$url");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_COOKIESESSION,true);
curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH,true);
curl_setopt($ch, CURLOPT_COOKIEJAR,'/web/sokker.cz/sokker.cz/service/'.$scriptName.'.txt');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "ilogin=$login&ipassword=$password&submit=Submit");
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
$page = curl_exec($ch);
curl_setopt($ch, CURLOPT_URL,"$url");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_COOKIESESSION,true);
curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH,true);
curl_setopt($ch, CURLOPT_COOKIEJAR,'/web/sokker.cz/sokker.cz/service/'.$scriptName.'.txt');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "ilogin=$login&ipassword=$password&submit=Submit");
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
$page = curl_exec($ch);
ephixe [del] para
Arturo8a
Thanks !
Here is the code for the login :
[color=orange]$url = "http://online.sokker.org/start.php?session=xml";
$data = array ("ilogin" => "******","ipassword" => "******");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url) or die("Erreur CURLOPT_URL");
curl_setopt($ch, CURLOPT_POST, 1) or die("Erreur CURLOPT_POST");
curl_setopt($ch, CURLOPT_POSTFIELDS,$data) or die("Erreur CURLOPT_POSTFIELDS");
curl_exec($ch) or die ("Erreur curl_exec");
[/color]
And then, I use a function :
[color=orange]function curl_download($remote, $local) {
$cp = curl_init($remote);
$fp = fopen($local, "w");
curl_setopt($cp, CURLOPT_FILE, $fp) or die("Erreur CURLOPT_FILE");
curl_setopt($cp, CURLOPT_HEADER, 0) or die("Erreur CURLOPT_HEADER");
curl_exec($cp) or die("Erreur curl_exec");
curl_close($cp) or die("Erreur curl_close");
fclose($fp) or die("Erreur fclose");
}[/color]
And then :
curl_download("http://online.sokker.org/xml/team-[11947].xml","http://ephixe.free.fr/gesteam/xml/team-[11947].xml");
Is it serious, doctor :) ?
Cdt,
@BlueZero : thanks too, but how do you use it ?
(editado)
(editado)
Here is the code for the login :
[color=orange]$url = "http://online.sokker.org/start.php?session=xml";
$data = array ("ilogin" => "******","ipassword" => "******");
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url) or die("Erreur CURLOPT_URL");
curl_setopt($ch, CURLOPT_POST, 1) or die("Erreur CURLOPT_POST");
curl_setopt($ch, CURLOPT_POSTFIELDS,$data) or die("Erreur CURLOPT_POSTFIELDS");
curl_exec($ch) or die ("Erreur curl_exec");
[/color]
And then, I use a function :
[color=orange]function curl_download($remote, $local) {
$cp = curl_init($remote);
$fp = fopen($local, "w");
curl_setopt($cp, CURLOPT_FILE, $fp) or die("Erreur CURLOPT_FILE");
curl_setopt($cp, CURLOPT_HEADER, 0) or die("Erreur CURLOPT_HEADER");
curl_exec($cp) or die("Erreur curl_exec");
curl_close($cp) or die("Erreur curl_close");
fclose($fp) or die("Erreur fclose");
}[/color]
And then :
curl_download("http://online.sokker.org/xml/team-[11947].xml","http://ephixe.free.fr/gesteam/xml/team-[11947].xml");
Is it serious, doctor :) ?
Cdt,
@BlueZero : thanks too, but how do you use it ?
(editado)
(editado)
BlueZero para
ephixe [del]
This is the login
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"$url");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_COOKIESESSION,true);
curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH,true);
curl_setopt($ch, CURLOPT_COOKIEJAR,'/web/sokker.cz/sokker.cz/service/'.$scriptName.'.txt');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "ilogin=$login&ipassword=$password&submit=Submit");
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
$page = curl_exec($ch);
Now you are logged in.
Notice the row with CURLOPT_COOKIEJAR, it will write the cookie in the file (change the setting to you file), then it will use it to repost cookie.
then you just have to
curl_setopt($ch, CURLOPT_URL,"$url");
$page = curl_exec($ch);
and you will get the page you want.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"$url");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_COOKIESESSION,true);
curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH,true);
curl_setopt($ch, CURLOPT_COOKIEJAR,'/web/sokker.cz/sokker.cz/service/'.$scriptName.'.txt');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "ilogin=$login&ipassword=$password&submit=Submit");
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20);
$page = curl_exec($ch);
Now you are logged in.
Notice the row with CURLOPT_COOKIEJAR, it will write the cookie in the file (change the setting to you file), then it will use it to repost cookie.
then you just have to
curl_setopt($ch, CURLOPT_URL,"$url");
$page = curl_exec($ch);
and you will get the page you want.
ephixe [del] para
BlueZero
The second $url is "http://online.sokker.org/xml/team-[11947].xml", for example ?
And then, what do you do with the $page ?
Download ? Parse ?
Thanks for your help !
And then, what do you do with the $page ?
Download ? Parse ?
Thanks for your help !
BlueZero para
ephixe [del]
yes for example that page. but it should be http://online.sokker.org/xml/team-11947.xml
in $page you have the entire xml. I parse it. I dont know what you want to do with it ;-).
in $page you have the entire xml. I parse it. I dont know what you want to do with it ;-).
ephixe [del] para
BlueZero
I thought you must download the file before parsing it...
I'll try this evening with your code, thanks !
I'll try this evening with your code, thanks !
BlueZero para
ephixe [del]
this command downloads the file: $page = curl_exec($ch);
ephixe [del] para
BlueZero
Well, it works, I can read and parse the file :)
Thank you very much, BlueZero !!
Now, I just have to work :D
Thank you very much, BlueZero !!
Now, I just have to work :D
¿How can I download files xml of the leagues of one division? I want to make a list of teams that amount and go down of one divisions.
But I want to know if you know some method to make it easy and simple, or a program to do it faster than manually.
But I want to know if you know some method to make it easy and simple, or a program to do it faster than manually.
i have problem when i write to me browser
http://online.sokker.org/xml/players-[23213].xml
i see only this :
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<sokkerData>EMPTY</sokkerData>
What should i do ?
http://online.sokker.org/xml/players-[23213].xml
i see only this :
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<sokkerData>EMPTY</sokkerData>
What should i do ?
Terrion para
Vergillio [del]
Remove the [] :)
http://online.sokker.org/xml/players-23213.xml
http://online.sokker.org/xml/players-23213.xml
tell you what would be a good new addition to this - an xml file which shows you the matches of the current cup round.
hmmmm actually http://online.sokker.org/xml/matches-league-1009-2.xml gives me the matches for round 2 (week0??) for scotland. Does anyone know IF there is a league range for cup games?
(editado)
hmmmm actually http://online.sokker.org/xml/matches-league-1009-2.xml gives me the matches for round 2 (week0??) for scotland. Does anyone know IF there is a league range for cup games?
(editado)
ok this is the same for all cups. This is a bit of a nuisance to pull cup data down - we are in week 0 yet the cup is in round 2. Nooooooooooo
This IS fixable but i would need to know the actual cup league ID details. Anyone? (lets hope its in a reserved block)
This IS fixable but i would need to know the actual cup league ID details. Anyone? (lets hope its in a reserved block)
chaps. I am using the following code to login.
$ch=curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookieFileName");
curl_setopt($ch,CURLOPT_URL,"http://online.sokker.org/start.php?session=xml");
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,"ilogin=$userid&ipassword=$pass");
curl_setopt($ch,CURLOPT_DNS_USE_GLOBAL_CACHE,false);
ob_start();
curl_exec($ch);
ob_end_clean();
return $ch;
it works fine BUT i am unable to tell if the login worked or not. Obviously if the login works then the xml is downloaded but for the life of me i cannot make it stop attemtping to grab xml if the login fails.
Any help?
$ch=curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookieFileName");
curl_setopt($ch,CURLOPT_URL,"http://online.sokker.org/start.php?session=xml");
curl_setopt($ch,CURLOPT_POST,1);
curl_setopt($ch,CURLOPT_POSTFIELDS,"ilogin=$userid&ipassword=$pass");
curl_setopt($ch,CURLOPT_DNS_USE_GLOBAL_CACHE,false);
ob_start();
curl_exec($ch);
ob_end_clean();
return $ch;
it works fine BUT i am unable to tell if the login worked or not. Obviously if the login works then the xml is downloaded but for the life of me i cannot make it stop attemtping to grab xml if the login fails.
Any help?
_ne0_ [del] para
rtg [del]
From xmlinfo.php:
POST variables are ilogin and ipassword.
Possible replies from the script:
# "OK" - athentication succeded
# "FAILED errorno=[error number]" - athentication failed
(1 - bad password, 3 - user has no team, 4 - user is banned, 5 - user is a bakrupt, 6 - user IP is blacklisted)
Maybe it could help you...
By the way, if someone is skilled enough in Visual Basic and could help me to open from Excel the XML files with a script, I would very much appreciate :)
POST variables are ilogin and ipassword.
Possible replies from the script:
# "OK" - athentication succeded
# "FAILED errorno=[error number]" - athentication failed
(1 - bad password, 3 - user has no team, 4 - user is banned, 5 - user is a bakrupt, 6 - user IP is blacklisted)
Maybe it could help you...
By the way, if someone is skilled enough in Visual Basic and could help me to open from Excel the XML files with a script, I would very much appreciate :)