0

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?

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by DavidB
0

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

Edited by almostbob: n/a

0

Thank-you.

That looks simple enough.

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.