NetTalk Central

Author Topic: Getting The Client IP Address  (Read 3340 times)

RayA

  • Newbie
  • *
  • Posts: 43
    • View Profile
    • My Web Site
    • Email
Getting The Client IP Address
« on: March 04, 2012, 10:14:08 PM »
Bruce,
I would like to get the client ip address and set a session variable when the index page is requested.  What  emb point is the best place to do this?

Ray Abadie

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Getting The Client IP Address
« Reply #1 on: March 04, 2012, 10:35:24 PM »
Hi Ray,

you don't really need to set a session value, although you can if you like.

there's a method
p_web.GetSessionIP()
which returns the IP number of he current session.

while on this topic - there's a property
webserver.NoIPSpoofing
which when set, means that a session is "bound" to a specific IP address. This is more secure, but can e a problem if there are proxy servers, between the client and the server.

cheers
Bruce




cheers
Bruce

RayA

  • Newbie
  • *
  • Posts: 43
    • View Profile
    • My Web Site
    • Email
Re: Getting The Client IP Address
« Reply #2 on: March 05, 2012, 08:29:18 AM »
Thanks Bruce ......   ;D