2 Replies - 1108 Views - Last Post: 24 August 2012 - 03:43 PM Rate Topic: -----

#1 den510  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 22-August 12

Get IP address of webpage guest using python in lieu of php

Posted 24 August 2012 - 02:48 PM

Hey everybody,

I've been using python to script my webpages for a while now, and my boss set me to the task of logging visitor's ip addresses, because he wants to know who has been making what changes if they're using the lab's username.

I've scoured the web for about a week with no success, I figured this is the place to ask the question.

What I'm looking for:

A way to use python/html/javascript to obtain the ip address of any visitor to my page.

Thanks in advance. My fate is in your hands.

-Dennis

Is This A Good Question/Topic? 0
  • +

Replies To: Get IP address of webpage guest using python in lieu of php

#2 BetaWar  Icon User is offline

  • #include "soul.h"
  • member icon

Reputation: 1105
  • View blog
  • Posts: 6,918
  • Joined: 07-September 06

Re: Get IP address of webpage guest using python in lieu of php

Posted 24 August 2012 - 03:17 PM

Based on this, it looks like os.environ['REMOTE_ADDR'] may be what you are looking for.

Hope that helps.
Was This Post Helpful? 1
  • +
  • -

#3 den510  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 22-August 12

Re: Get IP address of webpage guest using python in lieu of php

Posted 24 August 2012 - 03:43 PM

Works like a charm, plus all the data from the documentation page. Thank you very much!

-Dennis
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1