RE: [PHP-WIN] Get referer with PHP
| From: | Gustav Wiberg | Date: | Tue, 12 Jun 2007 13:26:00 +0000 |
| Subject: | RE: [PHP-WIN] Get referer with PHP | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-28068@lists.php.net to get a copy of this message | ||
Hi there!
If you mean independet of webserver, then try using Javascript. I don't know the command for
retrieving URL in Javascript, but I'm pretty sure there
Is one out there.
Best regards
/Gustav Wiberg
-----Original Message-----
From: Bradley Stahl [mailto:bradley.stahl@gmail.com]
Sent: Tuesday, June 12, 2007 3:07 PM
To: Luis Moreira (ESI-GSQP)
Cc: php-windows@lists.php.net
Subject: Re: [PHP-WIN] Get referer with PHP
Luis,
Try using the "$_SERVER['HTTP_REFERER']" server variable to get the URL of
the page that referred the current user to your page. Let me know if this
helps.
--Brad
On 6/12/07, Luis Moreira (ESI-GSQP) <luis.moreira@esi.pt> wrote:
>
> Hi
>
> This is possibly way too simple, but let me ask just the same :
>
> I want to add some code (may be PHP) on an HTML page, to check the
> referrer.
> It has to be web-server independent.
> If the page is invoked by URL X, ok, if not, the page should not
> be
> shown.
>
> Can this be done ?
>
> Thanks
> Luis
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>