Re: testing ip filtering
| From: | Marek Kilimajer | Date: | Mon, 07 Jun 2004 11:25:54 +0000 |
| Subject: | Re: testing ip filtering | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187779@lists.php.net to get a copy of this message | ||
Merlin wrote:
Hi there, I am serving certain parts of my page only to specific countries (geotargeted advertisement). Now I am wondering how I could check how the page looks like from that country wihout traveling there :-) Is there a way to "fool" the system that one is in US instead of Germany? Thanx for any advice, MerlinYou need to get around the way you find out the country, for example: if(DEBUG && isset($_GET['country'])) { $country = $_GET['country']; } else { $country = get_country_from_ip($_SERVER['REMOTE_ADDR']); } Hope this code makes it clear ;-)