1

Topic: IP to user assignment

Just a quickie. big_smile Which script sees to updating the user/IP pair?


Cheers,

Matt

Re: IP to user assignment

what pair?

3

Re: IP to user assignment

The online ident bit. smile Wanting to try and adapt it so that the IP of the logged in user is updated as and when the IP changes and the previous IP is removed. I may be wrong in how I think it works at the moment, but it would appear the IP to username info is updated, but the old IP is left in state until the online timeout expires?

Re: IP to user assignment

ident is a username for users, it's an IP for guests
When you login, your guest online entry is deleted and on your first pageview, your new user online entry is created

5

Re: IP to user assignment

So when you login, the ident becomes the username, and your IP address is stored as what/where? Once you've logged in, if your IP address is changing every page or two, that old IP then becomes seen as a guest connection, and your recent/actual IP is listed/correlated with you. Is that correct?


Cheers,

Matt

Re: IP to user assignment

MattF wrote:

So when you login, the ident becomes the username, and your IP address is stored as what/where? Once you've logged in, if your IP address is changing every page or two, that old IP then becomes seen as a guest connection, and your recent/actual IP is listed/correlated with you. Is that correct?


Cheers,

Matt

No, that's not correct. IP based tracking stops once you have a cookie. The order of events goes something like this

- Does the user have a valid cookie
    - Yes
        - Does the user have an entry in the online table already?
            - Yes
                - Update the entry with the current time
            - No
                - Add a new entry for the user id/username
    - No
        - Does the IP have an entry in the online table already?
            - Yes
                - Update the entry with the current time
            - No
                - Add a new entry for the user id/IP

7

Re: IP to user assignment

Right. I've obviously picked the totally wrong conclusion then. My apologies. smile That does lead onto another question, though. big_smile I have one user that I've noted, specifically using the AOL system, that when they shift pages, from a page requiring being logged in, to any other another page, their IP changes, yet the previous IP, (attributed correctly as guest in the username bit), is still appearing to be viewing pages requiring login. I know that technically they are logged in, and it's only the fact that the username has been correlated to a different IP, but is there any way to remove that previous IP from the table when the new IP is assigned to their username? It is merely to stop the 'appearance' that a guest is logged in and accessing pages they obviously can't. big_smile

p.s: I really hope the above makes sense. big_smile


Thanks again,

Matt

Re: IP to user assignment

Oh, so when they go to login they have one IP but when they submit the form they have a different IP?
There really isn't a good way to deal with that (because there's no way to track what IP someone previously had when the method you're tracking them with requires an IP. You just have to wait for the timeout.

9

Re: IP to user assignment

Yup. That's pretty much what's happening. Like an octopus on acid. You never know which tentacle is gonna appear. big_smile It can be any one of about four IP's that the next connection will come from as a rule, so they're all over the place.


Cheers for the advice.

Matt