does header("Location: n") work on non-browser agents?
| From: | Erik Price | Date: | Fri, 08 Feb 2002 16:05:34 +0000 |
| Subject: | does header("Location: n") work on non-browser agents? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-84003@lists.php.net to get a copy of this message | ||
My site uses a scheme whereby a session variable (say, $logged_in) is checked for. If the variable is not set to 1, then header("Location: ./index.php") is used to redirect the browser to index.php, where they are offered an opportunity to log in (setting the session variable $logged_in to 1).
But then I thought to myself, could this page still be accessed by a script or a spider, or some other agent besides a browser? I don't know much about how HTTP works, but I am wondering if this is an adequate means of protecting my site from unlogged-in visitors.
TIA,
Erik
----
Erik Price
Web Developer Temp
Media Lab, H.H. Brown
pricee@hhbrown.com