Simple JavaScript file to locate from which country access your website
- Download
userLocation.js
and save it in yourlib
directory
<li>Include this SCRIPTS in your website HEAD tag</li>
<pre>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js" type="text/javascript"/>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript"/>
</pre>
<li>Also include <code>userLocation.js</code> file</li>
<li>Append a new element with <code>id = 'ajaxResponse'</code> to your HTML</li>
<p>The result of the ajax request will be loaded inside that element</p>