[Zope] accessing REMOTE_ADDR

Timothy Wilson wilson@visi.com
Tue, 2 Oct 2001 12:25:11 -0500 (CDT)


Thank you for your very thorough post. I'll save this and study it further.

On Tue, 2 Oct 2001, Richard Barrett wrote:

> The question you have to ask yourself is: why do I care what the IP number 
> of the machine running the user's browser is? What benefit do you expect 
> you application to derive from knowing this IP number?

An excellent question--one that I skipped in my initial post for the sake of
brevity. Here's why I care:

1. We've started working on a site for our school's media center (i.e.,
library). (http://www.isd197.org/sibley/imc/) The front page of the site
contains links to a number of subscription-based databases that students can
use from school, but not from home. I thought it would be cool (do I need
another reason :-) to display the links if the person is browsing from a
machine on our LAN, but display only text if they're browsing from
outside. Also, I would add a note saying that the databases are only
available internally when the page is viewed externally.

2. I'm teaching an Intro to Comp Prog using Python this year and would like
to find a way to share the solutions to the assignments that I give with my
students, but not with the rest of the world. I thought I might display a
link to "the answer" when the kids browse on our LAN, but not
elsewhere. Truly secure? Not really. But probably secure enough for my


Tim Wilson      |   Visit Sibley online:   | Check out:
Henry Sibley HS |  http://www.isd197.org   | http://www.zope.com
W. St. Paul, MN |                          | http://slashdot.org
wilson@visi.com |  <dtml-var pithy_quote>  | http://linux.com