My Web Application (Code) Uses The IP Address Of Users And Stopped Working With Ezoic?

Modified on: Sat, 4 Jul, 2020 at 11:52am

If your application is no longer receiving the correct IP addresses of your visitors and/or is receiving a lot of duplicate IP addresses, it is most likely because your code is not looking at the X-Forwarded-For header (http://en.wikipedia.org/wiki/X-Forwarded-For). 


The X-Forwarded-For header is part of the HTTP standard and is used both by Ezoic and many ISPs world-wide.


Ezoic sends the IP address of the original web visitor through to your server in the X-Forwarded-For header.


In PHP it is available in: $_SERVER['HTTP_X_FORWARDED_FOR']


In .NET its available in HttpContext.Current.Request.Headers["X-Forwarded-For"].


You can read more about implementing the X-Forwarded-For header here: Using the X-Forwarded-For (XFF) Header



Loading ...