Adsense Publisher

funlife@yeah.net adpublish@yeah.net

June 20, 2008

how to use php show different contents for different countries

Filed under: Web Design — admin @ 11:12 pm

you’ll need to use something like GeoIP or IP2Location to automatically find out where in the world a user is…
You can then use something similar to:

PHP Code:
if($location == “GB”){ //Content for users in GB (Great Britain/mainland UK) } elseif($location == “JP”){ // Content for users in Japan } else{ //default content in English, perhaps }

HostGator, Host unlimited sites! & Dreamhost, Host unlimited sites
USD50FREEIP ==== USD50 free, and 1 IP Free! Dreamhost

www.adsensepublish.com