I've downloaded such script:
$QUERY_STRING="login";
if (file_exists("passwd.dat") && $QUERY_STRING != ""):
require ("passwd.dat");
if (!isset($alogin) || md5($pass) != $Password[$alogin] || !isset($Password[$alogin])):
$logined = 0;
//$error = "Неверный логин или пароль!<br>";
setcookie("alogin","",0);
setcookie("pass","",0);
else:
$logined = 1;
setcookie("alogin",$alogin,time()+60*60*24*30*12);
setcookie("pass",$pass,time()+60*60*24*30*12);
endif;
endif;
?>
and it works just fine on remote server, but doesn't work on local one. As I figured out, on remote machine $_POST/$_COOKIE arrays are "unpacked" to just variables, e.g. if $_POST['abc'] is defined you can access it via $abc. What mechanism is it? Just don't know where to look...