Sounds like what you want is the referrer:

referer()
Return the URL of the page the browser was viewing prior to fetching your
script. Not available for all browsers.

$referer = $q->referer();

HTH,
Trevor Joerges
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$_=q;USFWPSZK.ZKPFSHFT,kvtuZbopuifsZQZibdl,qpxfsfeZcyZQ,,iuuq://;.q;xxx.;.
q;~,[EMAIL PROTECTED],;;s;~;tfoenjnf.dpn;g;y;B-x;A-w;;s;P;perl;g;s;,;\n;g;s;Y;
;g;print;
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

----- Original Message ----- 
From: "compuserve" <[EMAIL PROTECTED]>
To: "activeperl mailing list" <[EMAIL PROTECTED]>
Sent: Monday, January 12, 2004 4:31 PM
Subject: getting IP of referring web site


> Hi all
>
> what I'm trying to do is verify that a perl script on our web server is
only
> called by someone clicking on a link from a partner web site and not just
by
> calling the script directly by, for example, by just typing the url into
> their browser.
>
> We are using the CGI module in our script and I use %Vars and %ENV to get
> the environment variables which exist when the script is called.  But how
> can I access the IP address of the calling web site. The variable
> REMOTE_SERVER and the function call remote_host() both seem to send me the
> ip address of the client who has clicked on the link as opposed to the ip
> address of the server that is hosting the link.
>
> Sorry if this is a bit garbled this issue has just come up and we nned to
> sort something quickly. Any suggestions about how to get the ip address of
a
> refering web site much appreciated
>
> TIA
>
> Bill
>
> Apologies if this posting appears more than once but the list doesn't seem
> to be working so I sent the message twice.
>
>
> _______________________________________________
> ActivePerl mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>


_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to