Well, The title says it all.. :doh:
I am really kinda lost with this issue..
Can someone guide me step by step how to go about this..
Printable View
Well, The title says it all.. :doh:
I am really kinda lost with this issue..
Can someone guide me step by step how to go about this..
http://www.netbuilders.org/server-ad....html#post4857
http://www.netbuilders.org/web-proxi...html#post16001
http://www.netbuilders.org/web-proxi...3.html#post246
http://www.netbuilders.org/web-proxi...html#post18475
Those are a few posts that give a few methods you can use
Perhaps this can help :
http://www.netbuilders.org/server-ad...-com-1796.html
See, I have a shard hosting.. And I don't got direct access to server..
Is there a way I can tmzhosting to do it for me ?
Or some other way prolly I can do it myself ??
Using Glype? Put this at the top of index.php
Download the geoip.inc and geoip.dat from MaxMindPHP Code:<?php
include('geoip.inc'); //this file must exist in your directory
$gi = geoip_open('/your/path/to/GeoIP.dat',GEOIP_STANDARD);
// get the ip of the visitor
$addr = getenv('REMOTE_ADDR');
// translate his ip to a country code
$country = geoip_country_code_by_addr($gi, $addr);
// close the geo database
geoip_close($gi);
$badcountry = array('CN','KW','RU','IR','NG','PK','TR','SA');
// redirect them if they suck
if(in_array($country, $badcountry))
header('Location: http://www.SOMEDOMAIN.com'); //enter a url or page on your site
?>
geoip.inc > Index of /download/geoip/api/php
geoip.dat (click the download link for GeoLite Country binary format) > MaxMind - GeoLite Country | Open Source IP Address to Country Database
This will work at TMZ, I've used it.
http://www.netbuilders.org/web-proxi...html#post18475 this one uses javascript to accomplish it so you wouldnt need to worry if geoip mod is enabled on your server. Then another method just posted by dtkguy
Hmm Thanks..
Well I have 27 sites in my network..
DO I have to edit all of the index.php :(
Or can it be done more easily ?
There may be an easier way, I dunno.
But if it's Glype, the index.php will be the exact same for every site you have, so just edit it once, and then copy it to all the others.
Do you guys know that "single file trick" ?
Like you update 1 file and it gets updated on all other add on domains ?
Aquarezz has used it I guess..