Re: PHP Warning: session_destroy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



# aajdubuc@xxxxxxxxxxx / 2007-01-20 17:14:34 -0500:
> To stop bots from accessing secured pages, I've added the following
> code to a banner page that is called by every page. Furthermore, each
> page starts with <?php session_start(); ?> and includes the banner
> page:
> 
> 'top1.php' [banner page]
> 
> <?php 
> 	if((eregi("((Yahoo! Slurp|Yahoo! Slurp China|.NET CLR|Googlebot/2.1|
> Gigabot/2.0|Accoona-AI-Agent))",$_SERVER['HTTP_USER_AGENT'])))
> 	{ 
> 		if ($_SERVER['HTTPS'] == "on")
> 		{
> 			session_destroy();
> 			header("Location: http://localhost/logout.php";);

google for robots.txt, less work with the same effect.

-- 
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man.  You don't KNOW.
Cause you weren't THERE.             http://bash.org/?255991

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux