Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Aug 20, 2010 @ 05:03
    Casey Neehouse
    1

    IP Address

    Can you capture the IP address using server variables in your method?  Otherwise, submitting a common IP defeats the purpose of the field.

    Case

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 27, 2010 @ 08:10
    Sebastiaan Janssen
    0

    Well, say that the post is coming from Flash or another server, can I always determine the actual IP address of the person posting the form? I don't think it's going to be reliably available... Please prove me wrong! :-)

  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Aug 27, 2010 @ 08:16
    Casey Neehouse
    0

    It may not be reliable, but it is better than getting hundreds of internal network addresses.  Most people now use NAT Routers to share internet connections, and as such, getting the local IP doesn't help any.  IE, my machine has an IP of 192.168.1.xxx, which is private.  My public IP is something else, and is used to determine IP metrics.

    Server logs, and so on, use the REMOTE_ADDR server variable.  If anything, it could be a default to an empty IP address, or a second method without.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 27, 2010 @ 08:19
    Sebastiaan Janssen
    0

    See, that's why I'm leaving it up to the implementor to provide the correct IP address, the machine that first recieves the form values must know from which IP address it's coming. In fact, I'll have a look later, but I think that if I try to detect the IP address, I will always get the IP of the server that sends the form, and that would be useless.

  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Aug 27, 2010 @ 08:20
    Casey Neehouse
    0

    Further, using simple html forms, or even ajax request, there is no way to get the IP.  It would have to be set from the server on rendering the form, and that would be accomplished via the server variables.

  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Aug 27, 2010 @ 08:26
    Casey Neehouse
    0

    What is the purpose of the IP field?  Is it to record which server served ror received the form or which client submitted form results?

    If I am right (and I may not be), the IP is the submitters IP address.  REMOTE_ADDR provides the sumbitters IP.

    If this option isn't there, then the IP will always be 0.0.0.0 when I use this.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Aug 27, 2010 @ 08:31
    Sebastiaan Janssen
    0

    That's exactly what I'm trying to say. :-) Yes, the IP should be of the actual person on the other end submitting the from. Alright, I'll check REMOTE_ADDR out later!

  • Casey Neehouse 1339 posts 483 karma points MVP 2x admin
    Aug 27, 2010 @ 08:33
    Casey Neehouse
    1

    I think we are both right.  Why not provide the option to send the IP, and if it is not submitted, then use the server variable.

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Sep 02, 2010 @ 07:25
    Sebastiaan Janssen
    1

    Hey Casey, this is now added, the IP address and the nodeId are no longer mandatory. I haven't been able to test what happens with a submit from Flash, but in theory it should be okay.

    Thanks for the feedback! :-)

Please Sign in or register to post replies

Write your reply to:

Draft