jacques has asked for the wisdom of the Perl Monks concerning the following question:
Recently I needed to tell if the client, who was requesting a page, was on the same machine as the server itself.
I was constructing a link such as "a href="/usr/bin"
And I wanted the link to work, but only if the client and server were on the same machine. So I thought one way of checking would be to compare the remote and server addresses in the environment variables. If they matched, then I could generate the link in my CGI script to display on an HTML page. Otherwise, I would leave out the link.
Are there better ways of doing this?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: [OT] Who is requesting the page?
by simonm (Vicar) on Jul 17, 2005 at 23:31 UTC | |
Re: [OT] Who is requesting the page?
by graff (Chancellor) on Jul 18, 2005 at 02:51 UTC | |
Re: [OT] Who is requesting the page?
by greenFox (Vicar) on Jul 18, 2005 at 06:43 UTC | |
by jacques (Priest) on Jul 18, 2005 at 16:52 UTC | |
Re: [OT] Who is requesting the page?
by waswas-fng (Curate) on Jul 18, 2005 at 04:28 UTC | |
Re: [OT] Who is requesting the page?
by TedPride (Priest) on Jul 18, 2005 at 06:38 UTC | |
by waswas-fng (Curate) on Jul 18, 2005 at 19:02 UTC |
Back to
Seekers of Perl Wisdom