C# Auto Detect Preferred Country(sarin.mobi)

submitted by sathaisathai(262) 3 years, 3 months ago

I found that IP to Country has not been that best practices in locating that visitor preferred country, mostly because of IP are allocated to ISP in there registered country, but where the actual user with that assign IP address can be anywhere (also the VPN). Therefore a better way to detect that website visitor is to check their actual browser preferred language and country, this is done by the Request.UserLanguages in C#, but due to that this property return with a array of language that the visitor browser is set to, therefore not just one country is return. So I would need way to query this array and return only the country short code.

add a comment |category: |Views: 39

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story