Click here to Skip to main content
15,922,894 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

C#
//client connecting to a web server through an HTTP proxy or load balancer
           String ip = HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];

           if (string.IsNullOrEmpty(ip))
           {
               ip = HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
           }

           return ip;




am getting the ip address using this code how can i get country name by using this ip address please help me
Posted

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900