[medusa] Information about "Client_IP_Adress:Mysterious_Number"
Mon, 5 Jun 2000 04:31:47 -0700 (PDT)
Jilani Khaldi writes:
> Now everything seems to work fine. Everytime I open a web page I
> see on the monitor: IP_Address of the client + ':' + an other
> number which changes when I go on a new page. What does that
> number mean and how can I call it (know it) from a python script?
> Could that number (+ client IP_Address) be used to controll
If you're using the <persistent_script_handler> class, then you can
access the <request> object directory to find out the IP and port
number of each connection.
(something like request.channel.socket.getpeername() ought to work)
However, using the ip:port pair is not a reliable way of tracking a
user, because for example many users will come through a proxy. [i.e.,
they will be sharing the IP address with potentially thousands of
The only reliable way to track users is to either use 'cookies':
Or to use forms with hidden variables. [i.e., http://my_host/my_uri?id=29348392]