Hi, I would like to show my own custom ads/links to only visitors from US. Can I know how can I do this? Thanks you.
you need to know the ip address of your visitor, and list of us ip address. then just check the ip, if non us don't display the ads. hope this help you.
It is very easy to do but you either need to buy a database of IPs or subscribe to a geolocator web service - remember that the IPs change over time so even if you buy the data you have to "budget" for updating the database a couple of times a year. A very simple example in .Net using an adrotator to control the showing of adverts would be: '''' get users country from IP Dim sqlquery As String = "SELECT country FROM iptocountry WHERE ip = @ip" Dim sqlconn As New SqlConnection("your connectionstring") Dim sqlcomm As New SqlCommand(sqlquery, sqlconn) Dim country As String sqlcomm.Parameters.AddWithValue("ip", Request.UserHostAddress) sqlconn.Open() country = sqlcomm.ExecuteScalar sqlconn.Close() '''' Logic on ad filtering If country = "USA" Then AdRotator1.KeywordFilter = "USA" Else AdRotator1.KeywordFilter = "Non-USA" End If Code (.Net):