I Wanna to view ads1 when ip is from usa or canada and view ads2 when from KSA and view ads 3 from anywhere else

    I assume you are talking about Geo targeting?

    well simple solution would be to write a script which performs a whois on the ip address in question and the parse out the required infomation.

      No U Did understand me ...
      i have google ads and yahoo ads and another company ads i wanna google ads to be seen by Usa Users Only and Yahoo By KSA And all other country see the other company ads
      i am new in php and i am searching 4 someone can do me this code

        www.hostip.info have a cool API which will let you pass the IP address of the person on your website and return a country code like us, ca, gb, es, pl etc.

        Hope this helps.

          Write a Reply...