Hey Stéphane,

Thursday, June 21, 2001, 8:37:53 AM, you wrote:



SJB> How can I get the URL which was calling my script (like
SJB> document.referrer in Javascript)


SJB> tks

This will show you all the available ENV variables pick the one you
want and use it as   $ENV{HTTP_REFERER}

<code>
#!/usr/local/bin/perl
#/cgi-bin/envTable.pl
print "Content-type:  text/html\n\n";
print <<HTMLhead;
<html><head><title>CGI Environment</title></head><body>
<table border=0>
<tr><td align=right>Variable</td><td>Content<BR></td></tr>
HTMLhead

foreach $env_var (sort keys %ENV) {
    print "<tr><td align=right>$env_var</td><td>$ENV{$env_var}<BR></td></tr>\n";
}

print "</table></body></html>\n";
</code>

-- 
[EMAIL PROTECTED]
Using The Bat! eMail v1.53d
Windows NT 5.0.2195 (Service Pack 1)
You're just jealous because the voices are talking to ME, not you!

Reply via email to