Re: Get 'document.referer' in perl?
by Chris Devers other posts by this author
Aug 31 2001 2:22PM messages near this date
view in the new Beta List Site
Get 'document.referer' in perl?
|
List Broken?
On Fri, 31 Aug 2001, Erik Andersson wrote:
> There is a variable called 'document.referer' in java scripts. It
> contains the refering url of the webpage which includes the java
> script.
>
> Does anyone know if it is possible to access 'document.referer' from a
> perl script, ie is it possible to get the refering url of the web page
> containing a perl script (loading for instance as img src...)?
By default, it's part of your %ENV hash, stored as $ENV{HTTP_REFERER}.
CGI.pm has builtin methods for accessing it -- if you've created a CGI
object as $q, then it's $q-> referer(). Generating a dump of the %ENV hash
will give you a list of the others you have access to -- generally 20 or
so properties for any given web transaction.
--
Chris Devers chris_devers@[...].com
_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Web@[...].com
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
Thread:
Erik Andersson
Chris Devers
|