# [EMAIL PROTECTED] / 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

Reply via email to