[suggestion] $_SERVER["SERVER_NAME"] sometimes not equal to the $_SERVER["HTTP_HOST"]
well...
when I use the login method
http://www.littlebau.com/server_name.gif
it use this Predicates
strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0)
[in Usually case]
the "HTTP_REFERER" 's dmain name is equal to the "SERVER_NAME"
[but in sometimes,They are not equal]
for example about that
http://www.littlebau.com/server_name2.gif
that you can see my port is 8086,so in this situation,the "strpos" method will never greater than 0,no value
solution 1,add the "SERVER_PORT"
strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].$_SERVER["PHP_SELF"])) > 0)
solution 2,Replace to "HTTP_HOST"
strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["HTTP_HOST"].$_SERVER["PHP_SELF"])) > 0)
I think solution 2 more better and easy to fix