Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once(”geoip/geoip.inc”);
- $gi = geoip_open(”geoip/GeoIP.dat”,GEOIP_STANDARD);
- $country_code = geoip_country_code_by_addr($gi, $_SERVER['REMOTE_ADDR']);
- geoip_close($gi);
- if($country_code == ‘CS’)
- {
- header(’Location: http://www.example.net/1/’);
- }
- else
- {
- header(’Location: http://www.example.net/2/’);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement