IP Conflict

Discussion in 'PHP' started by gigamike, Oct 25, 2006.

  1. #1
    Hi Guys,

    Please help me, is it possible to a user to have an IP conflict. What i mean let say a user logs on the system, I create a session for his/her IP

    ex. $_SESSION['user_session_ip']=$_SERVER['REMOTE_ADDR'];

    and then as he/she goes to other page, I get again his/her current IP

    $current_IP=$_SERVER['REMOTE_ADDR'];

    Now is this possible that $_SESSION['user_session_ip'] is not equal to $current_IP

    Please enlighten me :) or give me a scenario/situation for this.

    Thanks,

    mike
     
    gigamike, Oct 25, 2006 IP
  2. T0PS3O

    T0PS3O Feel Good PLC

    Messages:
    13,219
    Likes Received:
    777
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Yes, it is possible, especially when the visitors browses via proxy (AOL, large corporate networks etc.) or switches between http and https via proxies.
     
    T0PS3O, Oct 25, 2006 IP
  3. gigamike

    gigamike Active Member

    Messages:
    165
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    Hi sir,

    thanks for the idea, i guess now i know why the client requires it to me.

    Thanks again,

    mike

     
    gigamike, Oct 25, 2006 IP
  4. nddb

    nddb Peon

    Messages:
    803
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Why not just use PHP's built in sessions? It's a combination of IP and cookie...
     
    nddb, Oct 25, 2006 IP