Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Help Redirecting Traffic

  1. #11
    dtkguy's Avatar
    dtkguy is offline Still Learnin'
    Join Date
    Dec 2008
    Posts
    391
    Thanks
    7
    Thanked 164 Times in 108 Posts
    Yeah make sure mod_geoip is installed and working

  2. #12
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts
    You would need to get someone with php experience to get this to read the geoip file so it doesnt work as is

    Code:
    <?php 
    $block = array('US','IQ','NG','IR','SA','AG','MY','ID','CL','KW','AE'); 
    if (in_array($_SERVER['GEOIP_COUNTRY_CODE'], $block)) { 
    header("Location: http://centurian.org");
    exit; 
    } 
    ?>
    I never used it but its a possible fix if completed.

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  3. #13
    Aquarezz's Avatar
    Aquarezz is offline Master Net Builder
    Join Date
    Dec 2008
    Location
    Belgium
    Posts
    3,852
    Blog Entries
    4
    Thanks
    683
    Thanked 591 Times in 463 Posts
    Thanks for helping me out, though I'll keep it like it is now... the block worked, but it isn't redirecting
    I'll do it once I have my new server

    Greetz
    |Nico Lawsons

  4. #14
    WebEvader's Avatar
    WebEvader is offline Moderator
    Join Date
    Jan 2009
    Posts
    397
    Blog Entries
    2
    Thanks
    166
    Thanked 26 Times in 21 Posts
    Does anyone know if this fix works with glype ?

    If it doesn't does anyone know how I can redirect traffic using glype ?

    Thanks,

  5. #15
    Mr.Bill's Avatar
    Mr.Bill is offline One is glad to be of service
    Join Date
    Dec 2008
    Location
    Redmond, Oregon
    Posts
    828
    Blog Entries
    1
    Thanks
    72
    Thanked 350 Times in 182 Posts
    the code given will work on any site or script. Since its in htaccess.

    Reverse IP Check ಠ_ಠ Proxy Sites
    <?php if ($youask == 'stupid question') { echo ('stupid answer'); } ?>

  6. #16
    sparks is offline Newbie Net Builder
    Join Date
    Mar 2009
    Location
    Canada
    Posts
    11
    Thanks
    0
    Thanked 5 Times in 1 Post
    A better way to use GeoIP is as follows.

    This method works very well with glype but would need a bit of work for PHProxy.

    You can put the following php code at the top of your index.php file and change $badcountry to the countries you want to redirect.

    First you have to download the follow.
    This is by Geolocation and Online Fraud Prevention from MaxMind
    Download this
    http://geolite.maxmind.com/download/...y/GeoIP.dat.gz - must be deflated with 7-Zip or similar program.
    http://geolite.maxmind.com/download/.../php/geoip.inc
    and use this PHP to interact with it.

    Interact using this php code in your index.php.

    <?php

    // PUT THIS CODE AT THE TOP OF YOUR INDEX.PHP BEFORE ANYTHING ELSE

    include('geoip/geoip.inc'); //this file must exist in your directory

    // Uncomment if querying against GeoIP/Lite City.
    // include('geoip/geoip.inc');

    $gi = geoip_open('geoip/geoip.dat',GEOIP_STANDARD);

    // get the ip of the visitor
    $addr = getenv('REMOTE_ADDR');
    // translate his ip to a country code
    $country = geoip_country_name_by_addr($gi, $addr);
    // close the geo database
    geoip_close($gi);

    $badcountry = array('Example','Example','Example','Example');

    // redirect them if they suck
    if(in_array($country, $badcountry))
    header('Location: Example Web Page'); //enter a url or page on your site

    ?>


    In the header('Location field put the site you want to redirect your $badcountry to.

    Hope this helps.. If you need it for phproxy I can try and help further.

  7. Thanked by:

    Aquarezz (19 March, 2009), strat (23 March, 2009), WebEvader (19 March, 2009), Will.Spencer (20 March, 2009), Zash (20 May, 2009)

  8. #17
    strat is offline Newbie Net Builder
    Join Date
    Mar 2009
    Posts
    47
    Thanks
    13
    Thanked 2 Times in 2 Posts
    who ever does not want china traffic you can redirect it to me.. PM me

    I am after china traffic

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 12
    Last Post: 23 June, 2010, 04:31 AM
  2. Redirecting Category Pages Help...
    By Alex Fraiser in forum Promoting
    Replies: 2
    Last Post: 11 July, 2009, 13:21 PM
  3. Replies: 1
    Last Post: 6 July, 2009, 09:39 AM
  4. Redirecting permalinks?
    By CoreyFreeman in forum Wordpress
    Replies: 1
    Last Post: 22 June, 2009, 09:46 AM
  5. Myspace redirecting to Google
    By Mr.Bill in forum Web Proxies
    Replies: 0
    Last Post: 29 May, 2009, 02:26 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •