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

2010-02-04 13:52:38
and where is the talent? :-)))
omg. I completely forgot :P

btw. this changes were made by greg :) there is one thing which doesn't allow me to make any changes there :)
2010-10-14 17:21:27
Hi all,

the following code worked until some days ago:

$curlSes = curl_init();
curl_setopt($curlSes,CURLOPT_URL,"http://online.sokker.org/start.php?session=xml");
curl_setopt($curlSes, CURLOPT_POST, true);
curl_setopt($curlSes,CURLOPT_POSTFIELDS,"ilogin=EricinaFC&ipassword=mypassword");
curl_setopt($curlSes,CURLOPT_COOKIEJAR, $MY_DIR);
curl_setopt($curlSes, CURLOPT_HEADER , false);
curl_setopt($curlSes, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($curlSes);
if($out === false)
{
die("Connection error.");
}
curl_close($curlSes);
echo "Success.";

Now, it no longer works. It returns "Connection error." instead of "Success."; does anyone know why?
(edited)
2010-10-14 20:39:12
probably your IP is blocked due to login errors
2010-10-14 22:47:49
This is weird, because I'm actually able to log in at the following address: http://online.sokker.org/xmlinfo.php. Hence there is a unusual paradox: I can log in via that html form but I can't do by my own code. If I were really blocked, I should be to both the systems, not only for just one.

Am I wrong?
2010-10-15 10:43:39
The script runs from a server or not? And you are loging in from IP of your computer.

But just guessing, maybe you r sript runs from your computer.
2010-10-15 11:00:09
As I already told, the code worked until some days ago, which means that it ran from a server, otherwise it would never worked. Simply, the script has suddenly begun to stop working.
(edited)
2010-10-15 11:58:18
triple equals ?

if($out === false)

try to set header to true
2010-10-15 13:23:35
The triple-equal stands for identical, that is "equals either in value and type". But I've checked that it still doesn't work with simple ==.

I've also tried to set header to true: nothing.

Other ideas? (and thanks for the time already spent).
2010-10-15 13:26:14
As I already told, the code worked until some days ago, which means that it ran from a server, otherwise it would never worked. Simply, the script has suddenly begun to stop working.
(edited)


that just confirms what i wrote, your server IP can be banned. And your computer IP not.
2010-10-15 13:29:40
One advice for debugging:
change the die line to this:
die("Connection error. Error:".curl_error($curlSes) );

Could help you identify the problem.
2010-10-15 13:38:10
here is a part of my (working) script

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__) . '/'.$cookie_file.'.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__) . '/'.$cookie_file.'.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HEADER , 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "ilogin=bogdanofnascie&ipassword=tryguess");
$result = curl_exec($ch);
curl_close($ch);
2010-10-15 16:27:29
mate as myself and blue have told you. It is more likely that your server IP is banned due to too many failed login attempts (3). Contact damian he can tell you if its banned or not
2010-10-15 20:34:08
If u have ssh acces to your server try to login at http://online.sokker.org/xmlinfo.php via putty through ssh tunnel.
2010-10-16 16:26:50
@BlueZero

I've modified my script like you advised me. Here's the result:

Connection error: Couldn't resolve host 'online.sokker.org'

@bogdanofnascie

I've adapted your script in this way:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://online.sokker.org/start.php?session=xml");
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__) . '/'.$cookie_file.'.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__) . '/'.$cookie_file.'.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_HEADER , 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "ilogin=ericinafc&ipassword=mypass");
$result = curl_exec($ch);
if($result === false)
{
die("Connection error: ".curl_error($ch));
}
curl_close($ch);

Same behaviour.

@rtg

It is more likely that your server IP is banned due to too many failed login attempts (3).

Very weird, since the script has never been changed, therefore I don't know where they come from these failed logins.

@TSEGAH

I have to check.

Contact damian he can tell you if its banned or not
(edited)
2010-10-17 12:47:24
Hi,

I used to play this game and just got started again.
I also used to use Sokker Manager, an access database made by Guacemole.
Reinstalling went fine, but it seems that the data it downloads do not enter the database.
Probably because there are extra features (like height etc..) the database does not support.
Is there a way of getting an xml file that only inlcudes the fields in the SM Database?

Greetz,
Amstaffy
2010-10-17 14:46:39
No, I guess not.
However, you can use other tools like Sokker Organizer or Sokker Viewer which probably offer the same functionality and support the new xml entries aswell.