You are not logged in.

Change Language:

Freelancer? Consultant? Check out: WorkTrail - Time Tracking made easy
Board » Django » Python Programming » get the ip of the visitor

Hi,

How can I find the ip address of the visitor of my site ?
Do you know any better way to identify the visitor ? (I know that you can use proxy to bypass the detection)

thank you
i guess you mean in django.. simply use request.META['REMOTE_ADDR']

as for identifying users.. you would usually use a cookie - in case of django you probably already have a session. so simply use the session.. what exactly do you try to achieve?
This answers the question. (Voted by 1 users including the author of the question.)
sorry I haven't been clear
I've installed django on my computer and give an access to some of my data with it.
As I don't want that some people abused of it and download everything over and over, I want to be able to monitor what's happening and eventually detect who's abusing.

but request.META['REMOTE_ADDR'] seems to work (it says 127.0.0.1 but I guess it's normal)
It's very normal because you are surfing locally. You didn't access to your project remotely. If you open your connection to remote than acces from another network via http you'll see your real ip adress.
Hi visit http://www.ip-details.com/ here they provide HTML code which help to track the ip address of the visitors who viisted your site .Copy paste the codes in your web site which provide you box that display the ip address of the visitor who visited your site...



--- Last Edited by recursion at 2012-11-28 01:51:59 ---





Powered by Sphene Community Tools