You are not logged in or Registered. Please Login or Register to get rid of this message and the Advertisements on the forum.
SearchMember ListCalendarHelp Hello There, Guest! Register

User(s) Viewing This Thread: 1 Guest(s)
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GeoIP that works with glype
03-26-2009, 04:43 AM
Post: #1
GeoIP that works with glype
Hi,

Here is a code that will let you redirect traffic by which country it comes from.

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/geoi...oIP.dat.gz - must be deflated with 7-Zip or similar program.
http://geolite.maxmind.com/download/geoi.../geoip.inc
and use this PHP to interact with it.

Interact using this php code in your index.php.
PHP Code:
<?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: http://webevader.org'); //enter a url or page on your site

?>
Visit this user's website Find all posts by this user
Quote this message in a reply
03-31-2009, 05:50 AM
Post: #2
RE: GeoIP that works with glype
So can you tell us step by step what to do ;)

Top 5 proxies !!!
http://hidestuff.info
http://hidecash.info
http://hideuniversity.info
http://hidelaw.info
http://hidecollege.info
Find all posts by this user
Quote this message in a reply
03-31-2009, 07:34 AM
Post: #3
RE: GeoIP that works with glype
Insert the above code in your index.php then where it says example replace that with the countries u wish to block

Regards
FrozenNova - Forum Moderator
PHP, XHTML,CSS Coding Service Available
Find all posts by this user
Quote this message in a reply
03-31-2009, 08:35 AM (This post was last modified: 03-31-2009 08:35 AM by coows. Edit Reason: )
Post: #4
RE: GeoIP that works with glype
In the themes directory? or in the main root ) I have mine already setup.. just for your example just would like to know where index to insert it to. Also there are a few other locations to add some php script to show the countries too for different type of ads
(03-31-2009 07:34 AM)FrozenNova Wrote:  Insert the above code in your index.php then where it says example replace that with the countries u wish to block

For retal use :confused:
Find all posts by this user
Quote this message in a reply
03-31-2009, 09:03 AM
Post: #5
RE: GeoIP that works with glype
You would put it in the index.php of your glype root, the file in themes is main.php

Regards
FrozenNova - Forum Moderator
PHP, XHTML,CSS Coding Service Available
Find all posts by this user
Quote this message in a reply
04-03-2009, 05:29 AM
Post: #6
RE: GeoIP that works with glype
Yeah, it is the index.php of the glype root ;)

Visit this user's website Find all posts by this user
Quote this message in a reply
04-13-2009, 09:38 AM
Post: #7
RE: GeoIP that works with glype
GEOIP is a great tool. I used to combine it with an anti-proxy script to track down fake member accounts on one of my previous sites

[Image: 43vpv.jpg]
I add to the internet
My youtube Channel
My internet Track
Find all posts by this user
Quote this message in a reply
04-13-2009, 09:44 AM
Post: #8
RE: GeoIP that works with glype
Yea, it is a really useful tool and is pretty easy to use ;)

Visit this user's website Find all posts by this user
Quote this message in a reply
05-17-2009, 02:24 PM
Post: #9
RE: GeoIP that works with glype
Ive found that this site works pretty well. It doesn't redirect bad traffic but it blocks it! and at the click of a button.

Just used it for some of my proxies. http://blockacountry.com

Find all posts by this user
Quote this message in a reply
05-26-2009, 07:50 PM
Post: #10
RE: GeoIP that works with glype
Yea, Blockacountry is good and really easy to use.... However with the geoip mod you can still use the traffic instead of just blocking it.

Also they haven't been updated in a while so if you block china and iran traffic i would still aspect some to still be getting through. ;)

Visit this user's website Find all posts by this user
Quote this message in a reply

Bookmark
Bookmark to: Mr. Wong Bookmark to: Webnews Bookmark to: Icio Bookmark to: Oneview Bookmark to: Linkarena Bookmark to: Favoriten Bookmark to: Seekxl Bookmark to: Favit Bookmark to: Seoigg Bookmark to: Linksilo Bookmark to: Readster Bookmark to: Folkd Bookmark to: Yigg Bookmark to: Digg Bookmark to: Del.icio.us Bookmark to: Facebook Bookmark to: Reddit Bookmark to: StumbleUpon Bookmark to: Slashdot Bookmark to: Furl Bookmark to: Blinklist Bookmark to: Technorati Bookmark to: Newsvine Bookmark to: Blinkbits
Post Reply 


Forum Jump:

Contact UsWebEvader.orgReturn to TopReturn to ContentLite (Archive) ModeRSS Syndication