Some sites seem to customize their pages depending upon where they detect you are from (i.e. - U.S., Canada, UK, France, etc.).

How do they do that?

It would be nice to do something similar. My site is pretty simple, but I would like to avoid the risk of having a family member click on my AdSense ads and getting me kicked out of the program. So now I am wondering if there is some way to have a non-ad page served to my IP address, and a page with the ad on it served to everybody else. How would I go about doing this?

In php $_server is the ip address of the user

<?php if(!$_server['remote_addr'] ='myip'){ echo "my adwords code"; } else { echo '<img src="filler.jpg" alt="">'; } ?>

in other languages there is similar code


That looks simple enough.

I was afraid I might have to play with settings on the server and possibly mess things up.