ip based content based on country
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1033/ip-to-country">IP to Country?</a><br>
  <a href="http://stackoverflow.com/questions/4295970/ip-to-country-in-php">IP To Country in PHP</a>  </p>
</blockquote>



<p>i have a website where i am storing users ip address when they visit . i want to server them ip based first page content .i think i can store ip ranges in database and when the users come from those ranges i can serve them specific content. but the question is just after typing website address the website will load and it will show the default content .please tell how i can achieve this .
so that i can serve country based content to my users.
suppose if ip address is</p>

<pre><code>IP Address: 109.97.86.2 
</code></pre>

<p>it should detect that it is romania and it should present pages which is designed for romania</p>
