I know this may seem like a pretty easy question but I have yet to find the answer. I am working on a project at work where we have 2 sets of data and only certain visitors can see certain data. We have 1 set of data that can only be shown to users visiting from the United States and the other from anyone outside of the US.
I have already found a way to get country data based on the visitors ip address. The real trick here is provided the service with the users IP address. I know your probably thinking to yourself that is easy, but I am having trouble over here. If you use web server variable cgi.remote_addr you will get the correct address most of the time. In my case though many of our internal visitors are under the umbrella of our proxy server. This means that when I use cgi.remote_addr it actually retuns an internal address.
My question to all of my smart readers is, What are my options. I have the backing of my server admin so he can help me out in anyway I need but this is new territory for me. Any guidance you can provide is much appreciated.





