function _hslk($site){
if (preg_match("/hslk\' value=\'[a-z 0-9]+/i", $site, $val)){ }
return $hslk;
} else {
return false;
}
}
function animus_login($login, $haslo) {
$cookie_file = 'cookie.txt';
$c = curl_init();
curl_setopt($c, CURLOPT_COOKIEJAR, $cookie_file);
curl_setopt($c, CURLOPT_COOKIEFILE, $cookie_file);
curl_setopt($c, CURLOPT_URL, 'http://prisonwars.pl/');
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS, 'hslk='._hslk(animus_login($login, $haslo)).'&login='.$login.'&password='.$haslo);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
$s = curl_exec($c);
curl_close($c);
}
funkcja animus_login zwraca white screen. kiedy usunę ten kawałek: 'hslk='._hslk(animus_login($login, $haslo)) to wszystko jest ok... hslk to ukryty input.