Subpage under development, new version coming soon!
Thema: »news XML Data Improvements
Tha basic thing is
- Connect the servers
- Acquire the suitables and necessaries XMLs files
- Parse them
- Apply processing that you want
- Optionally store in a database
- Set up html page with the data.
- Connect the servers
- Acquire the suitables and necessaries XMLs files
- Parse them
- Apply processing that you want
- Optionally store in a database
- Set up html page with the data.
probably a noob question, but how to log off the xml-session?
there is special thing which is called timeout logout :P
(Edith war hier)
(Edith war hier)
so there is no way to deliberately end the session?
I have attempted to send the ilogin and ipassword information using the post method from java, however, I get this reply:
OK teamID=
I always get this response, no matter if the login information is correct or incorrect.
OK teamID=
I always get this response, no matter if the login information is correct or incorrect.
That's ok. After that go to the page where you were logged in from and follow the instructions. This time you skip the log in part.
I am not sure what you mean, I am not login in from a website, I am logging in from a Java application I am developing.
The code is here, it is in Java, and I believe it is right, so I do not understand why do I get returned:
OK teamID =
as I should get either (1 - bad password, 3 - user has no team, 4 - user is banned, 5 - user is a bakrupt, 6 - user IP is blacklisted)
The code is here:
String decodedString;
URL sokker = new URL("http://online.sokker.org/start.php?session=xml");
URLConnection sk = sokker.openConnection();
sk.setDoOutput(true);
OutputStreamWriter out = new OutputStreamWriter(sk.getOutputStream());
//is there something wrong I am doing with this post command through Java?
out.write("ilogin" + login);
out.write("ipassword" + password);
BufferedReader in = new BufferedReader(
new InputStreamReader(
sk.getInputStream()));
while ((decodedString = in.readLine()) != null) {
System.out.println(decodedString);
}
out.close();
The code is here, it is in Java, and I believe it is right, so I do not understand why do I get returned:
OK teamID =
as I should get either (1 - bad password, 3 - user has no team, 4 - user is banned, 5 - user is a bakrupt, 6 - user IP is blacklisted)
The code is here:
String decodedString;
URL sokker = new URL("http://online.sokker.org/start.php?session=xml");
URLConnection sk = sokker.openConnection();
sk.setDoOutput(true);
OutputStreamWriter out = new OutputStreamWriter(sk.getOutputStream());
//is there something wrong I am doing with this post command through Java?
out.write("ilogin" + login);
out.write("ipassword" + password);
BufferedReader in = new BufferedReader(
new InputStreamReader(
sk.getInputStream()));
while ((decodedString = in.readLine()) != null) {
System.out.println(decodedString);
}
out.close();
No, you're logged in. You can find on the page "OK" - athentication succeded.
I am not sure what you mean, I am not login in from a website, I am logging in from a Java application I am developing.
The code is here, it is in Java, and I believe it is right, so I do not understand why do I get returned:
OK teamID =
as I should get either (1 - bad password, 3 - user has no team, 4 - user is banned, 5 - user is a bakrupt, 6 - user IP is blacklisted)
Tell me, what kind a number would you expect when it would be correct?
I am not sure what you mean, I am not login in from a website, I am logging in from a Java application I am developing.
The code is here, it is in Java, and I believe it is right, so I do not understand why do I get returned:
OK teamID =
as I should get either (1 - bad password, 3 - user has no team, 4 - user is banned, 5 - user is a bakrupt, 6 - user IP is blacklisted)
Tell me, what kind a number would you expect when it would be correct?
That's the first step, logging in sokker to start a session. In the next connections to the xmls you want to get, you have to provide the cookie of the session so that the server knows you are already logged in.
Look in the http headers of the response to find the cookie.
Look in the http headers of the response to find the cookie.
Hi all !
I am trying to download an xml file from sokker with curl in php.
I succed in login in (I got the response OK teamID=11947), but I can't succed in reading the response and using the cookie to download the file.
Someone can help me ?
Thanks in advance,
ephixe
I am trying to download an xml file from sokker with curl in php.
I succed in login in (I got the response OK teamID=11947), but I can't succed in reading the response and using the cookie to download the file.
Someone can help me ?
Thanks in advance,
ephixe
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);