Get visitor location ( ASP.NET)


SUBMITTED BY: Guest

DATE: Aug. 24, 2013, 7:32 p.m.

FORMAT: Text only

SIZE: 211 Bytes

HITS: 1435

  1. string userHost = Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
  2. if (String.IsNullOrEmpty(userHost) ||
  3. String.Compare(userHost, "unknown", true) == 0){
  4. userHost = Request.UserHostAddress;}

comments powered by Disqus