Re: PHP Warning: session_destroy
| From: | Roman Neuhauser | Date: | Sun, 21 Jan 2007 10:11:11 +0000 |
| Subject: | Re: PHP Warning: session_destroy | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-247484@lists.php.net to get a copy of this message | ||
# aajdubuc@webhart.net / 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