Identify Country with IP

Dear All,

I need to display ads according to the country from where a user browses.

In my system, I have ads to display only in particular location. So how can I track the location (here country) of the particular user who is browsing the site.

Is there any way in Yii??

You can get the country of the visitor from his IP… check this page - http://www.ip2nation.com/