Re: PHP-using HTTP Guru ?
| From: | Sagi Bashari | Date: | Mon, 11 Feb 2002 18:59:59 +0000 |
| Subject: | Re: PHP-using HTTP Guru ? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-79950@lists.php.net to get a copy of this message | ||
Hi
Just use something like die(header('Location: abc.php')); and php will exit
after sending the header. If you don't exit, the client can probably ignore
the header and see the rest of the page.
Sagi
----- Original Message -----
From: "Erik Price" <pricee@hhbrown.com>
>
> I asked a question about this last week on php-general, but didn't get a
> response, and was hoping that someone who knows the PHP engine at a
> deeper level could help me:
>
> I am new to the concepts of HTTP, and how user agents communicate with
> servers via this protocol. I am wondering if all user-agents (such as
> Perl scripts/spiders, not necessarily just browsers) observe the PHP
> function 'header("Location: ")' function. I did some reading about HTTP
> this weekend, and learned that when PHP calls the 'header()' function,
> it's essentially giving the user agent instructions as to where to go
> next. In other words, it is not that the web server is actually
> refusing to serve the page to the user agent, but rather that the user
> agent is told to stop reading the page that is served and start reading
> something else.
>
> Is this correct? I am trying to keep unwanteds from accessing parts of
> my site using this idea, but if someone could code their way around this
> with Perl or something, I don't want to use it.
>
> Thank you,
> Erik