A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: IP Address

  1. #1
    Banned
    Join Date
    Mar 2009
    Posts
    153

    IP Address

    I am using $_SERVER['REMOTE_ADDR'] in my php file to get the user's IP address emailed to me.

    I tested this from my machine 5 times last week, and all the 5 mails i got had the SAME IP address. But when i tested it today, I get a different IP address.

    Is this how REMOTE_ADDR works? Is there a solution?

    Thanks in advance

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    so your IP address did not change over 5 days ...

    Musicman

  3. #3
    Banned
    Join Date
    Mar 2009
    Posts
    153
    I haven't changed my IP address manually, in fact I dont know if thats even possible. But everyday i disconnect my internet connection before i go to bed..So will that change my IP address?

  4. #4
    Programmer
    Join Date
    Aug 2007
    Posts
    173
    that would depend on if your running on a dynamic IP , if your on a static IP..should be fine..... (i think)
    Freelance: AS2, AS3, PHP, MySQL, JavaScript
    Skype: hunty93

  5. #5
    Registered User
    Join Date
    Feb 2001
    Posts
    13,041
    Hi,

    if you are on dynamic ip (common for domestic use), every time you connect, you get an available ip from some pool.
    At home (in a big city) this is never the same; at the office (out in the countryside) there seems to be little change

    Musicman

  6. #6
    Banned
    Join Date
    Mar 2009
    Posts
    153
    Oh god, so that means if a user checks my page on Monday and then checks again on Tuesday, I can get different IP address even if he had used same machine.
    Can i not have ONE IP for ONE MACHINE always?

  7. #7
    associate admedia's Avatar
    Join Date
    Oct 2001
    Location
    is
    Posts
    1,347
    You might want to use a Cookie or a Shared Object.

  8. #8
    Banned
    Join Date
    Mar 2009
    Posts
    153
    thanks admedia, but i guess cookies and shared objects are only meant for temporary storage of data in the users local. What if the user clears it up manually or using a PC-Cleaner software or something like that?

  9. #9
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    There is no way to guarantee that any user will maintain the same IP address for any extended period of time.

    The best way is a cookie. If a user changes their IP address, they'll still have the same cookie just as long as they don't use a different browser or clear cookies.

    But that's about as best as you're going to get since IP addresses change. You would also have to consider the fact that anyone on the same network shares the same external IP address. A cookie would pinpoint a specific user. Other than that, the only real way to make sure a user is the same is through user accounts. When someone is logged in, you can be sure it's the same user.

  10. #10
    Banned
    Join Date
    Mar 2009
    Posts
    153
    Oh Ok
    Anyways, thanks guys

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center