GeoIP

From TMM Wiki
Revision as of 16:06, 20 November 2008 by Trinidadr (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
NATS 3
Configuration Admin
NATS3 Configuration Options
Extra Country Options
PayVia Minimum
Log Admin Activity
IP Address Filtering
MEMBER EXPIRE PAD
Second Sign-up Matching
Affiliate Signup Email
GeoIP
Fake Upgrade

Download and install GeoIP from Maxmind.

Configure and test GeoIP, then find the nats/includes folder on your server, open the config.php file, and enter the following:

$config['IP_FILTER'] = 'GEOIP';

You can put it anywhere in the file except for after the last line.

Test Code

The following PHP code will help you test GeoIP. Put it in a file, put the file on your webserver, and load its URL. It should print your country's name.

<?
echo 'You are from '.apache_note("GEOIP_COUNTRY_NAME");
?>

See Also