RE: Get referer with PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



True

I tested, for now, on my own PC running Apache, and it does work.
I will try to find a javascript option, but for now I already have something
that does the trick, providing the info is there.

Thanks

-----Original Message-----
From: Stut [mailto:stuttle@xxxxxxxxx] 
Sent: terça-feira, 12 de Junho de 2007 14:26
To: Bradley Stahl
Cc: Luis Moreira (ESI-GSQP); php-windows@xxxxxxxxxxxxx
Subject: Re:  Get referer with PHP

Bradley Stahl wrote:
> 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.

Note that this cannot be relied upon. A fair number of proxies and even 
some browsers have the option to remove or not supply this header.

-Stut

> On 6/12/07, Luis Moreira (ESI-GSQP) <luis.moreira@xxxxxx> 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
>>
>>
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux