IP address

L

Lad

I would like to record visitor's IP address.How can I do that in
Python?
Thanks for help
L
 
L

Lad

Sybren said:
Lad enlightened us with:

Too little information. Visitors of what?

Sybren

I have a website written in Python and I would like to login every
visitor's IP address.
In other words, if a visitor come to my Python application, this
application will record his IP.
Is it possible?
Thank you
B.
 
J

Jon Ribbens

I have a website written in Python and I would like to login every
visitor's IP address.
In other words, if a visitor come to my Python application, this
application will record his IP.

Depending on what CGI framework you're using, something like:

os.environ["REMOTE_ADDR"]
 
S

Sybren Stuvel

Lad enlightened us with:
I have a website written in Python and I would like to login every
visitor's IP address.

Ehm... that's probably "log" not "login".
In other words, if a visitor come to my Python application, this
application will record his IP. Is it possible?

Sure it is. At least, using most Python web-interfaces. I can't give
you more info, since you don't describe anything about the website. Is
it mod_python? Django? CGI? Something else? Try giving us some
information we can work with!

Sybren
 
L

Lad

Sybren said:
Lad enlightened us with:

Ehm... that's probably "log" not "login".


Sure it is. At least, using most Python web-interfaces. I can't give
you more info, since you don't describe anything about the website. Is
it mod_python? Django? CGI? Something else? Try giving us some
information we can work with!

It is Django with mod_python
Regards,
L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top