Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.


    • CommentAuthorkevin
    • CommentTimeFeb 11th 2007
     
    is it possible to have a script at the top of the page that can figure what state a user is in. I want to display information that is customized for that state. I know i can get the ip address. is it possible to do a quick lookup. Also if that is possible how long would it take. I wouldnt want them waiting for all this to work if it takes a long time.
    thanks
    • CommentAuthorjiosis
    • CommentTimeFeb 19th 2007
     
    Ok Here is the answer:
    When a person is using the a blind/anonymous proxy his/her IP address won't be submitted to the server and instead the server receives the proxy server's IP address, so if you run a server side code to get that IP, you won't have the visitors real IP address!
    The PHP variable to get the visitor's IP address is $REMOTE_ADDR

    But using the javascript you can use the variable REMOTE_ADDR to get the person's real IP address because the JavaScript is running client side.
    So all you have to do is to submit this value to your server.

    I'm not sure how your page is.
    Is it a form or something else and if you need to filter or just tracking ?
    In case you are tracking, you can simply call a kind of image with that ip address as a part of name or querystring.

    Didn't test it but I guess it will work.