Getting a public IP address when connected to a router

Robert Brenstein rjb at robelko.com
Sun Dec 19 20:25:52 EST 2010


On 19.12.2010 at 15:22 Uhr -0700 Mike Bonner apparently wrote:
>Here are some possible ways to do what you want. I'm sure there are more.
>
>Have a specific entry address just for you that grabs your ip and stuffs it
>in a file.  Then all your other pages that log IP can reference the file to
>know what IP to ignore.
>
>Or set a special cookie for yourself that basically says "Hey its me!"
>
>Or similar to the first option, check a get passed variable to designate
>that its you. (IE http://myaddress.com/page.html?isitme=yes) and either set
>the ip in a file, or just keep passing isitme each time you switch pages.
>The first choice better than the second, as you only have to grab your IP
>and say that it's you once per session.
>
>I'm sure there are better ways, but this should work.
>

Using an extra page as your private entry point or a cookie, as Mike 
suggests, are good approaches since in the scenario you describe 
(your using a dynamically assigned ip address) you want to exclude 
that address only for your current session. It might happen that the 
address you used on one day another user gets on another day and you 
would not want to exclude them necessarily. In order to do that, your 
system must either identify your connections as they come or log each 
of your sessions, in a file or in a database, so later analyses can 
exclude those connections.

Robert




More information about the Use-livecode mailing list