Version Description
- Bugfix: The plugin did not recognise the login page when installed to a subdirectory.
- New: You can configure if it auto updates the GeoIP Database. Upon request of those people who have the paid database of MaxMind.
- Added Facebook and MSN to list of search engines.
- Changed the version of the geoip.inc file to the version of https://github.com/daigo75/geoip-api-php
Download this release
Release Info
Developer | iqpascal |
Plugin | iQ Block Country |
Version | 1.1.14 |
Comparing to | |
See all releases |
Code changes from version 1.1.13 to 1.1.14
- iq-block-country.php +10 -139
- lang/en_EN.mo +0 -0
- lang/en_EN.po +145 -120
- lang/iqblockcountry-nl_NL.mo +0 -0
- lang/iqblockcountry-nl_NL.po +148 -120
- libs/blockcountry-checks.php +67 -14
- libs/blockcountry-logging.php +70 -0
- libs/blockcountry-retrieve-geodb.php +92 -0
- libs/blockcountry-search-engines.php +3 -1
- libs/blockcountry-settings.php +35 -4
- libs/blockcountry-tracking.php +64 -1
- libs/geoip.inc +853 -787
- readme.txt +9 -2
iq-block-country.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/*
|
3 |
Plugin Name: iQ Block Country
|
4 |
Plugin URI: http://www.redeo.nl/2013/12/iq-block-country-wordpress-plugin-blocks-countries/
|
5 |
-
Version: 1.1.
|
6 |
Author: Pascal
|
7 |
Author URI: http://www.redeo.nl/
|
8 |
Description: Block visitors from visiting your website and backend website based on which country their IP address is from. The Maxmind GeoIP lite database is used for looking up from which country an ip address is from.
|
@@ -51,25 +51,6 @@ function iqblockcountry_this_plugin_first()
|
|
51 |
}
|
52 |
}
|
53 |
|
54 |
-
/*
|
55 |
-
* Schedule tracking if this option was set in the admin panel
|
56 |
-
*/
|
57 |
-
function iqblockcountry_schedule_tracking($old_value, $new_value)
|
58 |
-
{
|
59 |
-
$current_schedule = wp_next_scheduled( 'blockcountry_tracking' );
|
60 |
-
if ($old_value !== $new_value)
|
61 |
-
{
|
62 |
-
if ($new_value == '')
|
63 |
-
{
|
64 |
-
wp_clear_scheduled_hook( 'blockcountry_tracking' );
|
65 |
-
}
|
66 |
-
elseif ($new_value == 'on' && $current_schedule == FALSE)
|
67 |
-
{
|
68 |
-
wp_schedule_event( time(), 'hourly', 'blockcountry_tracking' );
|
69 |
-
}
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
|
74 |
/*
|
75 |
* Attempt on output buffering to protect against headers already send mistakes
|
@@ -86,123 +67,6 @@ function iqblockcountry_buffer_flush() {
|
|
86 |
}
|
87 |
|
88 |
|
89 |
-
/*
|
90 |
-
* iQ Block Tracking
|
91 |
-
*/
|
92 |
-
function iqblockcountry_tracking()
|
93 |
-
{
|
94 |
-
if (get_option("blockcountry_tracking") == "on")
|
95 |
-
{
|
96 |
-
$lasttracked = get_option("blockcountry_lasttrack");
|
97 |
-
global $wpdb;
|
98 |
-
|
99 |
-
$table_name = $wpdb->prefix . "iqblock_logging";
|
100 |
-
|
101 |
-
$content = array();
|
102 |
-
if (!empty($lasttracked))
|
103 |
-
{
|
104 |
-
$query = "SELECT id,ipaddress,count(ipaddress) as countip FROM $table_name WHERE banned=\"B\" and id > $lasttracked GROUP BY ipaddress ORDER BY id";
|
105 |
-
}
|
106 |
-
else
|
107 |
-
{
|
108 |
-
$query = "SELECT id,ipaddress,count(ipaddress) as countip FROM $table_name WHERE banned=\"B\" GROUP BY ipaddress ORDER BY id";
|
109 |
-
}
|
110 |
-
foreach ($wpdb->get_results( $query ) as $row)
|
111 |
-
{
|
112 |
-
$newcontent = array('ipaddress' => $row->ipaddress,'count' => $row->countip);
|
113 |
-
array_push($content,$newcontent);
|
114 |
-
$id = $row->id;
|
115 |
-
}
|
116 |
-
|
117 |
-
if (!empty($content))
|
118 |
-
{
|
119 |
-
$response = wp_remote_post(TRACKINGURL,
|
120 |
-
array(
|
121 |
-
'body' => $content
|
122 |
-
)
|
123 |
-
);
|
124 |
-
|
125 |
-
if (isset($id)) { update_option('blockcountry_lasttrack',$id); }
|
126 |
-
}
|
127 |
-
}
|
128 |
-
}
|
129 |
-
|
130 |
-
/*
|
131 |
-
* Download the GeoIP database from MaxMind
|
132 |
-
*/
|
133 |
-
function iqblockcountry_downloadgeodatabase($version, $displayerror)
|
134 |
-
{
|
135 |
-
|
136 |
-
if( !class_exists( 'WP_Http' ) )
|
137 |
-
include_once( ABSPATH . WPINC. '/class-http.php' );
|
138 |
-
|
139 |
-
if ($version == 6)
|
140 |
-
{
|
141 |
-
$url = IPV6DB;
|
142 |
-
$geofile = IPV6DBFILE;
|
143 |
-
}
|
144 |
-
else
|
145 |
-
{
|
146 |
-
$url = IPV4DB;
|
147 |
-
$geofile = IPV4DBFILE;
|
148 |
-
}
|
149 |
-
|
150 |
-
$request = new WP_Http ();
|
151 |
-
$result = $request->request ( $url );
|
152 |
-
$content = array ();
|
153 |
-
|
154 |
-
if (is_array($result) && array_key_exists('response',$result) && (in_array ( '403', $result ['response'] )) && (preg_match('/Rate limited exceeded, please try again in 24 hours./', $result['body'] )) ) {
|
155 |
-
if($displayerror){
|
156 |
-
?>
|
157 |
-
<p><?php _e('Error occured: Could not download the GeoIP database from'); ?> <?php echo " " . $url;?><br />
|
158 |
-
<?php _e('MaxMind has blocked requests from your IP address for 24 hours. Please check again in 24 hours or download this file from your own PC'); ?><br />
|
159 |
-
<?php _e('Unzip this file and upload it (via FTP for instance) to:'); ?>
|
160 |
-
<strong> <?php echo $geofile;?></strong></p>
|
161 |
-
<?php
|
162 |
-
}
|
163 |
-
}
|
164 |
-
elseif ((isset ( $result->errors )) || (! (in_array ( '200', $result ['response'] )))) {
|
165 |
-
if($displayerror){
|
166 |
-
?>
|
167 |
-
<p><?php _e('Error occured: Could not download the GeoIP database from'); ?> <?php echo " " . $url;?><br />
|
168 |
-
<?php _e('Please download this file from your own PC unzip this file and upload it (via FTP for instance) to:'); ?>
|
169 |
-
<strong> <?php echo $geofile;?></strong></p>
|
170 |
-
<?php
|
171 |
-
}
|
172 |
-
} else {
|
173 |
-
|
174 |
-
/* Download file */
|
175 |
-
if (file_exists ( $geofile . ".gz" )) { unlink ( $geofile . ".gz" ); }
|
176 |
-
$content = $result ['body'];
|
177 |
-
$fp = fopen ( $geofile . ".gz", "w" );
|
178 |
-
fwrite ( $fp, "$content" );
|
179 |
-
fclose ( $fp );
|
180 |
-
|
181 |
-
/* Unzip this file and throw it away afterwards*/
|
182 |
-
$zd = gzopen ( $geofile . ".gz", "r" );
|
183 |
-
$buffer = gzread ( $zd, 2000000 );
|
184 |
-
gzclose ( $zd );
|
185 |
-
if (file_exists ( $geofile . ".gz" )) { unlink ( $geofile . ".gz" ); }
|
186 |
-
|
187 |
-
/* Write this file to the GeoIP database file */
|
188 |
-
if (file_exists ( $geofile )) { unlink ( $geofile ); }
|
189 |
-
$fp = fopen ( $geofile, "w" );
|
190 |
-
fwrite ( $fp, "$buffer" );
|
191 |
-
fclose ( $fp );
|
192 |
-
update_option('blockcountry_lastupdate' , time());
|
193 |
-
if($displayerror){
|
194 |
-
print "<p>" . _e('Finished downloading', 'iqblockcountry') . "</p>";
|
195 |
-
}
|
196 |
-
}
|
197 |
-
if (! (file_exists ( IPV4DBFILE ))) {
|
198 |
-
if($displayerror){
|
199 |
-
?>
|
200 |
-
<p><?php echo __('Fatal error: GeoIP') . " " . IPV4DBFILE . " " . __('database does not exists. This plugin will not work until the database file is present.'); ?></p>
|
201 |
-
<?php
|
202 |
-
}
|
203 |
-
}
|
204 |
-
}
|
205 |
-
|
206 |
/*
|
207 |
* Localization
|
208 |
*/
|
@@ -266,7 +130,11 @@ function iqblockcountry_upgrade()
|
|
266 |
$dbversion = get_option( 'blockcountry_version' );
|
267 |
update_option('blockcountry_version',VERSION);
|
268 |
|
269 |
-
if ($dbversion != "" && version_compare($dbversion, "1.1.
|
|
|
|
|
|
|
|
|
270 |
{
|
271 |
update_option('blockcountry_nrstatistics', 15);
|
272 |
}
|
@@ -312,6 +180,7 @@ require_once('libs/blockcountry-validation.php');
|
|
312 |
require_once('libs/blockcountry-logging.php');
|
313 |
require_once('libs/blockcountry-tracking.php');
|
314 |
require_once('libs/blockcountry-search-engines.php');
|
|
|
315 |
|
316 |
/*
|
317 |
* Main plugin works.
|
@@ -324,7 +193,7 @@ define("IPV4DBFILE",WP_PLUGIN_DIR . "/" . dirname ( plugin_basename ( __FILE__ )
|
|
324 |
define("IPV6DBFILE",WP_PLUGIN_DIR . "/" . dirname ( plugin_basename ( __FILE__ ) ) . "/GeoIPv6.dat");
|
325 |
define("TRACKINGURL","http://tracking.webence.nl/iq-block-country-tracking.php");
|
326 |
define("TRACKINGRETRIEVEURL","http://tracking.webence.nl/iq-block-country-retrieve.php");
|
327 |
-
define("VERSION","1.1.
|
328 |
define("DBVERSION","121");
|
329 |
define("PLUGINPATH",plugin_dir_path( __FILE__ ));
|
330 |
|
@@ -364,6 +233,8 @@ add_filter ( 'update_option_blockcountry_tracking', 'iqblockcountry_schedule_tra
|
|
364 |
add_filter ( 'add_option_blockcountry_tracking', 'iqblockcountry_schedule_tracking', 10, 2);
|
365 |
add_filter ( 'update_option_blockcountry_apikey', 'iqblockcountry_schedule_retrieving', 10, 2);
|
366 |
add_filter ( 'add_option_blockcountry_apikey', 'iqblockcountry_schedule_retrieving', 10, 2);
|
|
|
|
|
367 |
add_action ( 'blockcountry_tracking', 'iqblockcountry_tracking' );
|
368 |
add_action ( 'blockcountry_retrievebanlist', 'iqblockcountry_tracking_retrieve_xml');
|
369 |
add_action ( 'init', 'iqblockcountry_buffer',1);
|
2 |
/*
|
3 |
Plugin Name: iQ Block Country
|
4 |
Plugin URI: http://www.redeo.nl/2013/12/iq-block-country-wordpress-plugin-blocks-countries/
|
5 |
+
Version: 1.1.14
|
6 |
Author: Pascal
|
7 |
Author URI: http://www.redeo.nl/
|
8 |
Description: Block visitors from visiting your website and backend website based on which country their IP address is from. The Maxmind GeoIP lite database is used for looking up from which country an ip address is from.
|
51 |
}
|
52 |
}
|
53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
/*
|
56 |
* Attempt on output buffering to protect against headers already send mistakes
|
67 |
}
|
68 |
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
/*
|
71 |
* Localization
|
72 |
*/
|
130 |
$dbversion = get_option( 'blockcountry_version' );
|
131 |
update_option('blockcountry_version',VERSION);
|
132 |
|
133 |
+
if ($dbversion != "" && version_compare($dbversion, "1.1.14", '<') )
|
134 |
+
{
|
135 |
+
update_option('blockcountry_automaticupdate', 'on');
|
136 |
+
}
|
137 |
+
elseif ($dbversion != "" && version_compare($dbversion, "1.1.11", '<') )
|
138 |
{
|
139 |
update_option('blockcountry_nrstatistics', 15);
|
140 |
}
|
180 |
require_once('libs/blockcountry-logging.php');
|
181 |
require_once('libs/blockcountry-tracking.php');
|
182 |
require_once('libs/blockcountry-search-engines.php');
|
183 |
+
require_once('libs/blockcountry-retrieve-geodb.php');
|
184 |
|
185 |
/*
|
186 |
* Main plugin works.
|
193 |
define("IPV6DBFILE",WP_PLUGIN_DIR . "/" . dirname ( plugin_basename ( __FILE__ ) ) . "/GeoIPv6.dat");
|
194 |
define("TRACKINGURL","http://tracking.webence.nl/iq-block-country-tracking.php");
|
195 |
define("TRACKINGRETRIEVEURL","http://tracking.webence.nl/iq-block-country-retrieve.php");
|
196 |
+
define("VERSION","1.1.14");
|
197 |
define("DBVERSION","121");
|
198 |
define("PLUGINPATH",plugin_dir_path( __FILE__ ));
|
199 |
|
233 |
add_filter ( 'add_option_blockcountry_tracking', 'iqblockcountry_schedule_tracking', 10, 2);
|
234 |
add_filter ( 'update_option_blockcountry_apikey', 'iqblockcountry_schedule_retrieving', 10, 2);
|
235 |
add_filter ( 'add_option_blockcountry_apikey', 'iqblockcountry_schedule_retrieving', 10, 2);
|
236 |
+
//add_filter ( 'update_option_blockcountry_backendlogging', 'iqblockcountry_blockcountry_backendlogging', 10, 2);
|
237 |
+
//add_filter ( 'add_option_blockcountry_backendlogging', 'iqblockcountry_blockcountry_backendlogging', 10, 2);
|
238 |
add_action ( 'blockcountry_tracking', 'iqblockcountry_tracking' );
|
239 |
add_action ( 'blockcountry_retrievebanlist', 'iqblockcountry_tracking_retrieve_xml');
|
240 |
add_action ( 'init', 'iqblockcountry_buffer',1);
|
lang/en_EN.mo
CHANGED
Binary file
|
lang/en_EN.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: iQ Block Country\n"
|
4 |
-
"POT-Creation-Date: 2014-
|
5 |
-
"PO-Revision-Date: 2014-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: iQ Block Country <info@redeo.nl>\n"
|
8 |
"Language: English\n"
|
@@ -15,358 +15,362 @@ msgstr ""
|
|
15 |
"X-Poedit-SearchPath-0: libs\n"
|
16 |
"X-Poedit-SearchPath-1: .\n"
|
17 |
|
18 |
-
#: libs/blockcountry-settings.php:
|
19 |
msgid ""
|
20 |
"Check which country belongs to an IP Address according to the current "
|
21 |
"database."
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: libs/blockcountry-settings.php:
|
25 |
msgid "IP Address to check:"
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: libs/blockcountry-settings.php:
|
29 |
msgid "No country for"
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: libs/blockcountry-settings.php:
|
33 |
msgid "could be found. Or"
|
34 |
msgstr ""
|
35 |
|
36 |
-
#: libs/blockcountry-settings.php:
|
37 |
msgid "is not a valid IPv4 or IPv6 IP address"
|
38 |
msgstr ""
|
39 |
|
40 |
-
#: libs/blockcountry-settings.php:
|
41 |
msgid "IP Adress"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: libs/blockcountry-settings.php:
|
45 |
msgid "belongs to"
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: libs/blockcountry-settings.php:
|
49 |
msgid "This country is not permitted to visit the frontend of this website."
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: libs/blockcountry-settings.php:
|
53 |
msgid "This country is not permitted to visit the backend of this website."
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: libs/blockcountry-settings.php:
|
57 |
msgid "This ip is present in the blacklist."
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: libs/blockcountry-settings.php:
|
61 |
msgid "Check IP address"
|
62 |
msgstr ""
|
63 |
|
64 |
-
#: libs/blockcountry-settings.php:
|
65 |
msgid "Download GeoIP database"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: libs/blockcountry-settings.php:
|
|
|
|
|
|
|
|
|
69 |
msgid "The GeoIP database is updated once a month. Last update: "
|
70 |
msgstr ""
|
71 |
|
72 |
-
#: libs/blockcountry-settings.php:
|
73 |
msgid "If you need a manual update please press buttons below to update."
|
74 |
msgstr ""
|
75 |
|
76 |
-
#: libs/blockcountry-settings.php:
|
77 |
msgid "Download new GeoIP IPv4 Database"
|
78 |
msgstr ""
|
79 |
|
80 |
-
#: libs/blockcountry-settings.php:
|
81 |
msgid "Download new GeoIP IPv6 Database"
|
82 |
msgstr ""
|
83 |
|
84 |
-
#: libs/blockcountry-settings.php:
|
85 |
msgid "Downloading..."
|
86 |
msgstr ""
|
87 |
|
88 |
-
#: libs/blockcountry-settings.php:
|
89 |
msgid "Active plugins"
|
90 |
msgstr ""
|
91 |
|
92 |
-
#: libs/blockcountry-settings.php:
|
93 |
msgid "Plugin name"
|
94 |
msgstr ""
|
95 |
|
96 |
-
#: libs/blockcountry-settings.php:
|
97 |
msgid "Version"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: libs/blockcountry-settings.php:
|
101 |
-
#: libs/blockcountry-settings.php:
|
102 |
msgid "URL"
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: libs/blockcountry-settings.php:
|
106 |
msgid "Export"
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: libs/blockcountry-settings.php:
|
110 |
msgid ""
|
111 |
"When you click on <tt>Backup all settings</tt> button a backup of the iQ "
|
112 |
"Block Country configuration will be created."
|
113 |
msgstr ""
|
114 |
|
115 |
-
#: libs/blockcountry-settings.php:
|
116 |
msgid ""
|
117 |
"After exporting, you can either use the backup file to restore your settings "
|
118 |
"on this site again or copy the settings to another WordPress site."
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: libs/blockcountry-settings.php:
|
122 |
msgid "Backup all settings"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: libs/blockcountry-settings.php:
|
126 |
msgid "Import"
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: libs/blockcountry-settings.php:
|
130 |
msgid "Click the browse button and choose a zip file that you exported before."
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: libs/blockcountry-settings.php:
|
134 |
msgid "Press Restore settings button, and let WordPress do the magic for you."
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: libs/blockcountry-settings.php:
|
138 |
msgid "Restore settings"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: libs/blockcountry-settings.php:
|
142 |
-
#: libs/blockcountry-settings.php:
|
143 |
msgid "Something went wrong exporting this file"
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: libs/blockcountry-settings.php:
|
147 |
msgid "Exporting settings..."
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: libs/blockcountry-settings.php:
|
151 |
msgid "Something went wrong importing this file"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: libs/blockcountry-settings.php:
|
155 |
msgid "All options are restored successfully."
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: libs/blockcountry-settings.php:
|
159 |
msgid "Invalid file."
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: libs/blockcountry-settings.php:
|
163 |
msgid "No correct import or export option given."
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: libs/blockcountry-settings.php:
|
167 |
msgid "Select which pages are blocked."
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: libs/blockcountry-settings.php:
|
171 |
msgid "Do you want to block individual pages:"
|
172 |
msgstr ""
|
173 |
|
174 |
-
#: libs/blockcountry-settings.php:
|
175 |
msgid "If you do not select this option all pages will be blocked."
|
176 |
msgstr ""
|
177 |
|
178 |
-
#: libs/blockcountry-settings.php:
|
179 |
msgid "Select pages you want to block:"
|
180 |
msgstr ""
|
181 |
|
182 |
-
#: libs/blockcountry-settings.php:
|
183 |
-
#: libs/blockcountry-settings.php:
|
184 |
-
#: libs/blockcountry-settings.php:
|
185 |
msgid "Save Changes"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: libs/blockcountry-settings.php:
|
189 |
msgid "Select which categories are blocked."
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: libs/blockcountry-settings.php:
|
193 |
msgid "Do you want to block individual categories:"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: libs/blockcountry-settings.php:
|
197 |
msgid "If you do not select this option all blog articles will be blocked."
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: libs/blockcountry-settings.php:
|
201 |
msgid "Do you want to block the homepage:"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: libs/blockcountry-settings.php:
|
205 |
msgid ""
|
206 |
"If you do not select this option visitors will not be blocked from your "
|
207 |
"homepage regardless of the categories you select."
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: libs/blockcountry-settings.php:
|
211 |
msgid "Select categories you want to block:"
|
212 |
msgstr ""
|
213 |
|
214 |
-
#: libs/blockcountry-settings.php:
|
215 |
msgid "Select which search engines are allowed."
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: libs/blockcountry-settings.php:
|
219 |
msgid "Select which search engines you want to allow:"
|
220 |
msgstr ""
|
221 |
|
222 |
-
#: libs/blockcountry-settings.php:
|
223 |
msgid ""
|
224 |
"This will allow a search engine to your site despite if you blocked the "
|
225 |
"country."
|
226 |
msgstr ""
|
227 |
|
228 |
-
#: libs/blockcountry-settings.php:
|
229 |
msgid "Frontend options"
|
230 |
msgstr ""
|
231 |
|
232 |
-
#: libs/blockcountry-settings.php:
|
233 |
msgid ""
|
234 |
"Do not block visitors that are logged in from visiting frontend website:"
|
235 |
msgstr ""
|
236 |
|
237 |
-
#: libs/blockcountry-settings.php:
|
238 |
msgid "Block visitors from visiting the frontend of your website:"
|
239 |
msgstr ""
|
240 |
|
241 |
-
#: libs/blockcountry-settings.php:
|
242 |
msgid ""
|
243 |
"Select the countries that should be blocked from visiting your frontend:"
|
244 |
msgstr ""
|
245 |
|
246 |
-
#: libs/blockcountry-settings.php:
|
247 |
msgid "Use the CTRL key to select multiple countries"
|
248 |
msgstr ""
|
249 |
|
250 |
-
#: libs/blockcountry-settings.php:
|
251 |
msgid "Frontend whitelist IPv4 and/or IPv6 addresses:"
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: libs/blockcountry-settings.php:
|
255 |
-
#: libs/blockcountry-settings.php:
|
256 |
msgid "Use a semicolon (;) to separate IP addresses"
|
257 |
msgstr ""
|
258 |
|
259 |
-
#: libs/blockcountry-settings.php:
|
260 |
msgid "Frontend blacklist IPv4 and/or IPv6 addresses:"
|
261 |
msgstr ""
|
262 |
|
263 |
-
#: libs/blockcountry-settings.php:
|
264 |
msgid "Backend Options"
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: libs/blockcountry-settings.php:
|
268 |
msgid ""
|
269 |
"Block visitors from visiting the backend (administrator) of your website:"
|
270 |
msgstr ""
|
271 |
|
272 |
-
#: libs/blockcountry-settings.php:
|
273 |
msgid "Your IP address is"
|
274 |
msgstr ""
|
275 |
|
276 |
-
#: libs/blockcountry-settings.php:
|
277 |
msgid "The country that is listed for this IP address is"
|
278 |
msgstr ""
|
279 |
|
280 |
-
#: libs/blockcountry-settings.php:
|
281 |
msgid ""
|
282 |
"Do <strong>NOT</strong> set the 'Block visitors from visiting the backend "
|
283 |
"(administrator) of your website' and also select"
|
284 |
msgstr ""
|
285 |
|
286 |
-
#: libs/blockcountry-settings.php:
|
287 |
msgid "below."
|
288 |
msgstr ""
|
289 |
|
290 |
-
#: libs/blockcountry-settings.php:
|
291 |
msgid ""
|
292 |
"You will NOT be able to login the next time if you DO block your own country "
|
293 |
"from visiting the backend."
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: libs/blockcountry-settings.php:
|
297 |
msgid "Select the countries that should be blocked from visiting your backend:"
|
298 |
msgstr ""
|
299 |
|
300 |
-
#: libs/blockcountry-settings.php:
|
301 |
msgid "Use the x behind the country to remove a country from this blocklist."
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: libs/blockcountry-settings.php:
|
305 |
msgid "Backend whitelist IPv4 and/or IPv6 addresses:"
|
306 |
msgstr ""
|
307 |
|
308 |
-
#: libs/blockcountry-settings.php:
|
309 |
msgid "Backend blacklist IPv4 and/or IPv6 addresses:"
|
310 |
msgstr ""
|
311 |
|
312 |
-
#: libs/blockcountry-settings.php:
|
313 |
msgid "Overall statistics since start"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: libs/blockcountry-settings.php:
|
317 |
msgid "visitors blocked from the backend."
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: libs/blockcountry-settings.php:
|
321 |
msgid "visitors blocked from the frontend."
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: libs/blockcountry-settings.php:
|
325 |
msgid "Basic Options"
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: libs/blockcountry-settings.php:
|
329 |
msgid "Message to display when people are blocked:"
|
330 |
msgstr ""
|
331 |
|
332 |
-
#: libs/blockcountry-settings.php:
|
333 |
msgid "Page to redirect to:"
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: libs/blockcountry-settings.php:
|
337 |
msgid ""
|
338 |
"If you select a page here blocked visitors will be redirected to this page "
|
339 |
"instead of displaying above block message."
|
340 |
msgstr ""
|
341 |
|
342 |
-
#: libs/blockcountry-settings.php:
|
343 |
msgid "Choose a page..."
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: libs/blockcountry-settings.php:
|
347 |
msgid "Send headers when user is blocked:"
|
348 |
msgstr ""
|
349 |
|
350 |
-
#: libs/blockcountry-settings.php:
|
351 |
msgid ""
|
352 |
"Under normal circumstances you should keep this selected! Only if you have "
|
353 |
"\"Cannot modify header information - headers already sent\" errors or if you "
|
354 |
"know what you are doing uncheck this."
|
355 |
msgstr ""
|
356 |
|
357 |
-
#: libs/blockcountry-settings.php:
|
358 |
msgid "Number of rows on statistics page:"
|
359 |
msgstr ""
|
360 |
|
361 |
-
#: libs/blockcountry-settings.php:
|
362 |
msgid "How many rows do you want to display on each tab the statistics page."
|
363 |
msgstr ""
|
364 |
|
365 |
-
#: libs/blockcountry-settings.php:
|
366 |
msgid "Allow tracking:"
|
367 |
msgstr ""
|
368 |
|
369 |
-
#: libs/blockcountry-settings.php:
|
370 |
msgid ""
|
371 |
"This sends only the IP address and the number of attempts this ip address "
|
372 |
"tried to login to your backend and was blocked doing so to a central server. "
|
@@ -374,128 +378,149 @@ msgid ""
|
|
374 |
"countries."
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: libs/blockcountry-settings.php:
|
378 |
msgid "API Key:"
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: libs/blockcountry-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
382 |
msgid "Last blocked visits"
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: libs/blockcountry-settings.php:
|
386 |
msgid "Date / Time"
|
387 |
msgstr ""
|
388 |
|
389 |
-
#: libs/blockcountry-settings.php:
|
390 |
msgid "IP Address"
|
391 |
msgstr ""
|
392 |
|
393 |
-
#: libs/blockcountry-settings.php:
|
394 |
msgid "Hostname"
|
395 |
msgstr ""
|
396 |
|
397 |
-
#: libs/blockcountry-settings.php:
|
398 |
msgid "Country"
|
399 |
msgstr ""
|
400 |
|
401 |
-
#: libs/blockcountry-settings.php:
|
402 |
msgid "Frontend/Backend"
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: libs/blockcountry-settings.php:
|
406 |
msgid "Frontend"
|
407 |
msgstr ""
|
408 |
|
409 |
-
#: libs/blockcountry-settings.php:
|
410 |
msgid "Backend banlist"
|
411 |
msgstr ""
|
412 |
|
413 |
-
#: libs/blockcountry-settings.php:
|
414 |
msgid "Backend & Backend banlist"
|
415 |
msgstr ""
|
416 |
|
417 |
-
#: libs/blockcountry-settings.php:
|
418 |
msgid "Backend"
|
419 |
msgstr ""
|
420 |
|
421 |
-
#: libs/blockcountry-settings.php:
|
422 |
msgid "Top countries that are blocked"
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: libs/blockcountry-settings.php:
|
426 |
-
#: libs/blockcountry-settings.php:
|
427 |
msgid "# of blocked attempts"
|
428 |
msgstr ""
|
429 |
|
430 |
-
#: libs/blockcountry-settings.php:
|
431 |
msgid "Top hosts that are blocked"
|
432 |
msgstr ""
|
433 |
|
434 |
-
#: libs/blockcountry-settings.php:
|
435 |
msgid "Top URLs that are blocked"
|
436 |
msgstr ""
|
437 |
|
438 |
-
#: libs/blockcountry-settings.php:
|
439 |
msgid "Home"
|
440 |
msgstr ""
|
441 |
|
442 |
-
#: libs/blockcountry-settings.php:
|
443 |
msgid "Pages"
|
444 |
msgstr ""
|
445 |
|
446 |
-
#: libs/blockcountry-settings.php:
|
447 |
msgid "Categories"
|
448 |
msgstr ""
|
449 |
|
450 |
-
#: libs/blockcountry-settings.php:
|
451 |
msgid "Search Engines"
|
452 |
msgstr ""
|
453 |
|
454 |
-
#: libs/blockcountry-settings.php:
|
455 |
msgid "Tools"
|
456 |
msgstr ""
|
457 |
|
458 |
-
#: libs/blockcountry-settings.php:
|
459 |
msgid "Logging"
|
460 |
msgstr ""
|
461 |
|
462 |
-
#: libs/blockcountry-settings.php:
|
463 |
msgid "Import/Export"
|
464 |
msgstr ""
|
465 |
|
466 |
-
#: libs/blockcountry-settings.php:
|
467 |
msgid "GeoIP database does not exists. Trying to download it..."
|
468 |
msgstr ""
|
469 |
|
470 |
-
#:
|
|
|
471 |
msgid "Error occured: Could not download the GeoIP database from"
|
472 |
msgstr ""
|
473 |
|
474 |
-
#:
|
475 |
msgid ""
|
476 |
"MaxMind has blocked requests from your IP address for 24 hours. Please check "
|
477 |
"again in 24 hours or download this file from your own PC"
|
478 |
msgstr ""
|
479 |
|
480 |
-
#:
|
481 |
msgid "Unzip this file and upload it (via FTP for instance) to:"
|
482 |
msgstr ""
|
483 |
|
484 |
-
#:
|
485 |
msgid ""
|
486 |
"Please download this file from your own PC unzip this file and upload it "
|
487 |
"(via FTP for instance) to:"
|
488 |
msgstr ""
|
489 |
|
490 |
-
#:
|
491 |
msgid "Finished downloading"
|
492 |
msgstr ""
|
493 |
|
494 |
-
#:
|
495 |
msgid "Fatal error: GeoIP"
|
496 |
msgstr ""
|
497 |
|
498 |
-
#:
|
499 |
msgid ""
|
500 |
"database does not exists. This plugin will not work until the database file "
|
501 |
"is present."
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: iQ Block Country\n"
|
4 |
+
"POT-Creation-Date: 2014-09-02 09:49+0100\n"
|
5 |
+
"PO-Revision-Date: 2014-09-02 09:49+0100\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: iQ Block Country <info@redeo.nl>\n"
|
8 |
"Language: English\n"
|
15 |
"X-Poedit-SearchPath-0: libs\n"
|
16 |
"X-Poedit-SearchPath-1: .\n"
|
17 |
|
18 |
+
#: libs/blockcountry-settings.php:130
|
19 |
msgid ""
|
20 |
"Check which country belongs to an IP Address according to the current "
|
21 |
"database."
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: libs/blockcountry-settings.php:134
|
25 |
msgid "IP Address to check:"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: libs/blockcountry-settings.php:144
|
29 |
msgid "No country for"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: libs/blockcountry-settings.php:144
|
33 |
msgid "could be found. Or"
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: libs/blockcountry-settings.php:144
|
37 |
msgid "is not a valid IPv4 or IPv6 IP address"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: libs/blockcountry-settings.php:149
|
41 |
msgid "IP Adress"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: libs/blockcountry-settings.php:149
|
45 |
msgid "belongs to"
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: libs/blockcountry-settings.php:152
|
49 |
msgid "This country is not permitted to visit the frontend of this website."
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: libs/blockcountry-settings.php:157
|
53 |
msgid "This country is not permitted to visit the backend of this website."
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: libs/blockcountry-settings.php:162
|
57 |
msgid "This ip is present in the blacklist."
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: libs/blockcountry-settings.php:168
|
61 |
msgid "Check IP address"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: libs/blockcountry-settings.php:174
|
65 |
msgid "Download GeoIP database"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: libs/blockcountry-settings.php:182
|
69 |
+
msgid "Automatic update is not setup. Last update: "
|
70 |
+
msgstr ""
|
71 |
+
|
72 |
+
#: libs/blockcountry-settings.php:187
|
73 |
msgid "The GeoIP database is updated once a month. Last update: "
|
74 |
msgstr ""
|
75 |
|
76 |
+
#: libs/blockcountry-settings.php:189
|
77 |
msgid "If you need a manual update please press buttons below to update."
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: libs/blockcountry-settings.php:195
|
81 |
msgid "Download new GeoIP IPv4 Database"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: libs/blockcountry-settings.php:202
|
85 |
msgid "Download new GeoIP IPv6 Database"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: libs/blockcountry-settings.php:207 libs/blockcountry-settings.php:211
|
89 |
msgid "Downloading..."
|
90 |
msgstr ""
|
91 |
|
92 |
+
#: libs/blockcountry-settings.php:217
|
93 |
msgid "Active plugins"
|
94 |
msgstr ""
|
95 |
|
96 |
+
#: libs/blockcountry-settings.php:224
|
97 |
msgid "Plugin name"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: libs/blockcountry-settings.php:224
|
101 |
msgid "Version"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: libs/blockcountry-settings.php:224 libs/blockcountry-settings.php:867
|
105 |
+
#: libs/blockcountry-settings.php:910
|
106 |
msgid "URL"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: libs/blockcountry-settings.php:249
|
110 |
msgid "Export"
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: libs/blockcountry-settings.php:250
|
114 |
msgid ""
|
115 |
"When you click on <tt>Backup all settings</tt> button a backup of the iQ "
|
116 |
"Block Country configuration will be created."
|
117 |
msgstr ""
|
118 |
|
119 |
+
#: libs/blockcountry-settings.php:251
|
120 |
msgid ""
|
121 |
"After exporting, you can either use the backup file to restore your settings "
|
122 |
"on this site again or copy the settings to another WordPress site."
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: libs/blockcountry-settings.php:255
|
126 |
msgid "Backup all settings"
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: libs/blockcountry-settings.php:262
|
130 |
msgid "Import"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: libs/blockcountry-settings.php:263
|
134 |
msgid "Click the browse button and choose a zip file that you exported before."
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: libs/blockcountry-settings.php:264
|
138 |
msgid "Press Restore settings button, and let WordPress do the magic for you."
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: libs/blockcountry-settings.php:269
|
142 |
msgid "Restore settings"
|
143 |
msgstr ""
|
144 |
|
145 |
+
#: libs/blockcountry-settings.php:292 libs/blockcountry-settings.php:295
|
146 |
+
#: libs/blockcountry-settings.php:304
|
147 |
msgid "Something went wrong exporting this file"
|
148 |
msgstr ""
|
149 |
|
150 |
+
#: libs/blockcountry-settings.php:307
|
151 |
msgid "Exporting settings..."
|
152 |
msgstr ""
|
153 |
|
154 |
+
#: libs/blockcountry-settings.php:322
|
155 |
msgid "Something went wrong importing this file"
|
156 |
msgstr ""
|
157 |
|
158 |
+
#: libs/blockcountry-settings.php:339
|
159 |
msgid "All options are restored successfully."
|
160 |
msgstr ""
|
161 |
|
162 |
+
#: libs/blockcountry-settings.php:342
|
163 |
msgid "Invalid file."
|
164 |
msgstr ""
|
165 |
|
166 |
+
#: libs/blockcountry-settings.php:347
|
167 |
msgid "No correct import or export option given."
|
168 |
msgstr ""
|
169 |
|
170 |
+
#: libs/blockcountry-settings.php:356
|
171 |
msgid "Select which pages are blocked."
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: libs/blockcountry-settings.php:363
|
175 |
msgid "Do you want to block individual pages:"
|
176 |
msgstr ""
|
177 |
|
178 |
+
#: libs/blockcountry-settings.php:364
|
179 |
msgid "If you do not select this option all pages will be blocked."
|
180 |
msgstr ""
|
181 |
|
182 |
+
#: libs/blockcountry-settings.php:369
|
183 |
msgid "Select pages you want to block:"
|
184 |
msgstr ""
|
185 |
|
186 |
+
#: libs/blockcountry-settings.php:391 libs/blockcountry-settings.php:445
|
187 |
+
#: libs/blockcountry-settings.php:488 libs/blockcountry-settings.php:584
|
188 |
+
#: libs/blockcountry-settings.php:688 libs/blockcountry-settings.php:839
|
189 |
msgid "Save Changes"
|
190 |
msgstr ""
|
191 |
|
192 |
+
#: libs/blockcountry-settings.php:404
|
193 |
msgid "Select which categories are blocked."
|
194 |
msgstr ""
|
195 |
|
196 |
+
#: libs/blockcountry-settings.php:411
|
197 |
msgid "Do you want to block individual categories:"
|
198 |
msgstr ""
|
199 |
|
200 |
+
#: libs/blockcountry-settings.php:412
|
201 |
msgid "If you do not select this option all blog articles will be blocked."
|
202 |
msgstr ""
|
203 |
|
204 |
+
#: libs/blockcountry-settings.php:417
|
205 |
msgid "Do you want to block the homepage:"
|
206 |
msgstr ""
|
207 |
|
208 |
+
#: libs/blockcountry-settings.php:418
|
209 |
msgid ""
|
210 |
"If you do not select this option visitors will not be blocked from your "
|
211 |
"homepage regardless of the categories you select."
|
212 |
msgstr ""
|
213 |
|
214 |
+
#: libs/blockcountry-settings.php:423
|
215 |
msgid "Select categories you want to block:"
|
216 |
msgstr ""
|
217 |
|
218 |
+
#: libs/blockcountry-settings.php:458
|
219 |
msgid "Select which search engines are allowed."
|
220 |
msgstr ""
|
221 |
|
222 |
+
#: libs/blockcountry-settings.php:465
|
223 |
msgid "Select which search engines you want to allow:"
|
224 |
msgstr ""
|
225 |
|
226 |
+
#: libs/blockcountry-settings.php:466
|
227 |
msgid ""
|
228 |
"This will allow a search engine to your site despite if you blocked the "
|
229 |
"country."
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: libs/blockcountry-settings.php:503
|
233 |
msgid "Frontend options"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: libs/blockcountry-settings.php:538
|
237 |
msgid ""
|
238 |
"Do not block visitors that are logged in from visiting frontend website:"
|
239 |
msgstr ""
|
240 |
|
241 |
+
#: libs/blockcountry-settings.php:544
|
242 |
msgid "Block visitors from visiting the frontend of your website:"
|
243 |
msgstr ""
|
244 |
|
245 |
+
#: libs/blockcountry-settings.php:550
|
246 |
msgid ""
|
247 |
"Select the countries that should be blocked from visiting your frontend:"
|
248 |
msgstr ""
|
249 |
|
250 |
+
#: libs/blockcountry-settings.php:551
|
251 |
msgid "Use the CTRL key to select multiple countries"
|
252 |
msgstr ""
|
253 |
|
254 |
+
#: libs/blockcountry-settings.php:567
|
255 |
msgid "Frontend whitelist IPv4 and/or IPv6 addresses:"
|
256 |
msgstr ""
|
257 |
|
258 |
+
#: libs/blockcountry-settings.php:567 libs/blockcountry-settings.php:575
|
259 |
+
#: libs/blockcountry-settings.php:671 libs/blockcountry-settings.php:679
|
260 |
msgid "Use a semicolon (;) to separate IP addresses"
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: libs/blockcountry-settings.php:575
|
264 |
msgid "Frontend blacklist IPv4 and/or IPv6 addresses:"
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: libs/blockcountry-settings.php:604
|
268 |
msgid "Backend Options"
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: libs/blockcountry-settings.php:638
|
272 |
msgid ""
|
273 |
"Block visitors from visiting the backend (administrator) of your website:"
|
274 |
msgstr ""
|
275 |
|
276 |
+
#: libs/blockcountry-settings.php:646
|
277 |
msgid "Your IP address is"
|
278 |
msgstr ""
|
279 |
|
280 |
+
#: libs/blockcountry-settings.php:646
|
281 |
msgid "The country that is listed for this IP address is"
|
282 |
msgstr ""
|
283 |
|
284 |
+
#: libs/blockcountry-settings.php:647
|
285 |
msgid ""
|
286 |
"Do <strong>NOT</strong> set the 'Block visitors from visiting the backend "
|
287 |
"(administrator) of your website' and also select"
|
288 |
msgstr ""
|
289 |
|
290 |
+
#: libs/blockcountry-settings.php:647
|
291 |
msgid "below."
|
292 |
msgstr ""
|
293 |
|
294 |
+
#: libs/blockcountry-settings.php:648
|
295 |
msgid ""
|
296 |
"You will NOT be able to login the next time if you DO block your own country "
|
297 |
"from visiting the backend."
|
298 |
msgstr ""
|
299 |
|
300 |
+
#: libs/blockcountry-settings.php:653
|
301 |
msgid "Select the countries that should be blocked from visiting your backend:"
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: libs/blockcountry-settings.php:654
|
305 |
msgid "Use the x behind the country to remove a country from this blocklist."
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: libs/blockcountry-settings.php:671
|
309 |
msgid "Backend whitelist IPv4 and/or IPv6 addresses:"
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: libs/blockcountry-settings.php:679
|
313 |
msgid "Backend blacklist IPv4 and/or IPv6 addresses:"
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: libs/blockcountry-settings.php:709
|
317 |
msgid "Overall statistics since start"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: libs/blockcountry-settings.php:712
|
321 |
msgid "visitors blocked from the backend."
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: libs/blockcountry-settings.php:714
|
325 |
msgid "visitors blocked from the frontend."
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: libs/blockcountry-settings.php:718
|
329 |
msgid "Basic Options"
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: libs/blockcountry-settings.php:753
|
333 |
msgid "Message to display when people are blocked:"
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: libs/blockcountry-settings.php:763
|
337 |
msgid "Page to redirect to:"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: libs/blockcountry-settings.php:764
|
341 |
msgid ""
|
342 |
"If you select a page here blocked visitors will be redirected to this page "
|
343 |
"instead of displaying above block message."
|
344 |
msgstr ""
|
345 |
|
346 |
+
#: libs/blockcountry-settings.php:770
|
347 |
msgid "Choose a page..."
|
348 |
msgstr ""
|
349 |
|
350 |
+
#: libs/blockcountry-settings.php:785
|
351 |
msgid "Send headers when user is blocked:"
|
352 |
msgstr ""
|
353 |
|
354 |
+
#: libs/blockcountry-settings.php:786
|
355 |
msgid ""
|
356 |
"Under normal circumstances you should keep this selected! Only if you have "
|
357 |
"\"Cannot modify header information - headers already sent\" errors or if you "
|
358 |
"know what you are doing uncheck this."
|
359 |
msgstr ""
|
360 |
|
361 |
+
#: libs/blockcountry-settings.php:792
|
362 |
msgid "Number of rows on statistics page:"
|
363 |
msgstr ""
|
364 |
|
365 |
+
#: libs/blockcountry-settings.php:793
|
366 |
msgid "How many rows do you want to display on each tab the statistics page."
|
367 |
msgstr ""
|
368 |
|
369 |
+
#: libs/blockcountry-settings.php:808
|
370 |
msgid "Allow tracking:"
|
371 |
msgstr ""
|
372 |
|
373 |
+
#: libs/blockcountry-settings.php:809
|
374 |
msgid ""
|
375 |
"This sends only the IP address and the number of attempts this ip address "
|
376 |
"tried to login to your backend and was blocked doing so to a central server. "
|
378 |
"countries."
|
379 |
msgstr ""
|
380 |
|
381 |
+
#: libs/blockcountry-settings.php:815
|
382 |
msgid "API Key:"
|
383 |
msgstr ""
|
384 |
|
385 |
+
#: libs/blockcountry-settings.php:821
|
386 |
+
msgid "Log all visits to the backend:"
|
387 |
+
msgstr ""
|
388 |
+
|
389 |
+
#: libs/blockcountry-settings.php:822
|
390 |
+
msgid ""
|
391 |
+
"This logs all visits to the backend despite if they are blocked or not. This "
|
392 |
+
"is mainly for debugging purposes."
|
393 |
+
msgstr ""
|
394 |
+
|
395 |
+
#: libs/blockcountry-settings.php:828
|
396 |
+
msgid "Auto update GeoIP Database:"
|
397 |
+
msgstr ""
|
398 |
+
|
399 |
+
#: libs/blockcountry-settings.php:829
|
400 |
+
msgid ""
|
401 |
+
"Selecting this update makes sure that the GeoIP database is downloaded once "
|
402 |
+
"a month."
|
403 |
+
msgstr ""
|
404 |
+
|
405 |
+
#: libs/blockcountry-settings.php:857
|
406 |
msgid "Last blocked visits"
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: libs/blockcountry-settings.php:867
|
410 |
msgid "Date / Time"
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: libs/blockcountry-settings.php:867 libs/blockcountry-settings.php:899
|
414 |
msgid "IP Address"
|
415 |
msgstr ""
|
416 |
|
417 |
+
#: libs/blockcountry-settings.php:867 libs/blockcountry-settings.php:899
|
418 |
msgid "Hostname"
|
419 |
msgstr ""
|
420 |
|
421 |
+
#: libs/blockcountry-settings.php:867 libs/blockcountry-settings.php:886
|
422 |
msgid "Country"
|
423 |
msgstr ""
|
424 |
|
425 |
+
#: libs/blockcountry-settings.php:867
|
426 |
msgid "Frontend/Backend"
|
427 |
msgstr ""
|
428 |
|
429 |
+
#: libs/blockcountry-settings.php:877 libs/blockcountry-settings.php:938
|
430 |
msgid "Frontend"
|
431 |
msgstr ""
|
432 |
|
433 |
+
#: libs/blockcountry-settings.php:877
|
434 |
msgid "Backend banlist"
|
435 |
msgstr ""
|
436 |
|
437 |
+
#: libs/blockcountry-settings.php:877
|
438 |
msgid "Backend & Backend banlist"
|
439 |
msgstr ""
|
440 |
|
441 |
+
#: libs/blockcountry-settings.php:877 libs/blockcountry-settings.php:939
|
442 |
msgid "Backend"
|
443 |
msgstr ""
|
444 |
|
445 |
+
#: libs/blockcountry-settings.php:884
|
446 |
msgid "Top countries that are blocked"
|
447 |
msgstr ""
|
448 |
|
449 |
+
#: libs/blockcountry-settings.php:886 libs/blockcountry-settings.php:899
|
450 |
+
#: libs/blockcountry-settings.php:910
|
451 |
msgid "# of blocked attempts"
|
452 |
msgstr ""
|
453 |
|
454 |
+
#: libs/blockcountry-settings.php:897
|
455 |
msgid "Top hosts that are blocked"
|
456 |
msgstr ""
|
457 |
|
458 |
+
#: libs/blockcountry-settings.php:908
|
459 |
msgid "Top URLs that are blocked"
|
460 |
msgstr ""
|
461 |
|
462 |
+
#: libs/blockcountry-settings.php:937
|
463 |
msgid "Home"
|
464 |
msgstr ""
|
465 |
|
466 |
+
#: libs/blockcountry-settings.php:940
|
467 |
msgid "Pages"
|
468 |
msgstr ""
|
469 |
|
470 |
+
#: libs/blockcountry-settings.php:941
|
471 |
msgid "Categories"
|
472 |
msgstr ""
|
473 |
|
474 |
+
#: libs/blockcountry-settings.php:942
|
475 |
msgid "Search Engines"
|
476 |
msgstr ""
|
477 |
|
478 |
+
#: libs/blockcountry-settings.php:943
|
479 |
msgid "Tools"
|
480 |
msgstr ""
|
481 |
|
482 |
+
#: libs/blockcountry-settings.php:944
|
483 |
msgid "Logging"
|
484 |
msgstr ""
|
485 |
|
486 |
+
#: libs/blockcountry-settings.php:945
|
487 |
msgid "Import/Export"
|
488 |
msgstr ""
|
489 |
|
490 |
+
#: libs/blockcountry-settings.php:999
|
491 |
msgid "GeoIP database does not exists. Trying to download it..."
|
492 |
msgstr ""
|
493 |
|
494 |
+
#: libs/blockcountry-retrieve-geodb.php:38
|
495 |
+
#: libs/blockcountry-retrieve-geodb.php:49
|
496 |
msgid "Error occured: Could not download the GeoIP database from"
|
497 |
msgstr ""
|
498 |
|
499 |
+
#: libs/blockcountry-retrieve-geodb.php:39
|
500 |
msgid ""
|
501 |
"MaxMind has blocked requests from your IP address for 24 hours. Please check "
|
502 |
"again in 24 hours or download this file from your own PC"
|
503 |
msgstr ""
|
504 |
|
505 |
+
#: libs/blockcountry-retrieve-geodb.php:40
|
506 |
msgid "Unzip this file and upload it (via FTP for instance) to:"
|
507 |
msgstr ""
|
508 |
|
509 |
+
#: libs/blockcountry-retrieve-geodb.php:50
|
510 |
msgid ""
|
511 |
"Please download this file from your own PC unzip this file and upload it "
|
512 |
"(via FTP for instance) to:"
|
513 |
msgstr ""
|
514 |
|
515 |
+
#: libs/blockcountry-retrieve-geodb.php:77
|
516 |
msgid "Finished downloading"
|
517 |
msgstr ""
|
518 |
|
519 |
+
#: libs/blockcountry-retrieve-geodb.php:85
|
520 |
msgid "Fatal error: GeoIP"
|
521 |
msgstr ""
|
522 |
|
523 |
+
#: libs/blockcountry-retrieve-geodb.php:85
|
524 |
msgid ""
|
525 |
"database does not exists. This plugin will not work until the database file "
|
526 |
"is present."
|
lang/iqblockcountry-nl_NL.mo
CHANGED
Binary file
|
lang/iqblockcountry-nl_NL.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: iQ Block Country\n"
|
4 |
-
"POT-Creation-Date: 2014-
|
5 |
-
"PO-Revision-Date: 2014-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: iQ Block Country <info@redeo.nl>\n"
|
8 |
"Language: Dutch\n"
|
@@ -15,103 +15,107 @@ msgstr ""
|
|
15 |
"X-Poedit-SearchPath-0: libs\n"
|
16 |
"X-Poedit-SearchPath-1: .\n"
|
17 |
|
18 |
-
#: libs/blockcountry-settings.php:
|
19 |
msgid ""
|
20 |
"Check which country belongs to an IP Address according to the current "
|
21 |
"database."
|
22 |
msgstr ""
|
23 |
"Controleer welk land behoort tot een IP adres volgens de huidige database."
|
24 |
|
25 |
-
#: libs/blockcountry-settings.php:
|
26 |
msgid "IP Address to check:"
|
27 |
msgstr "IP adres om te controleren:"
|
28 |
|
29 |
-
#: libs/blockcountry-settings.php:
|
30 |
msgid "No country for"
|
31 |
msgstr "Geen land voor"
|
32 |
|
33 |
-
#: libs/blockcountry-settings.php:
|
34 |
msgid "could be found. Or"
|
35 |
msgstr "gevonden. Of"
|
36 |
|
37 |
-
#: libs/blockcountry-settings.php:
|
38 |
msgid "is not a valid IPv4 or IPv6 IP address"
|
39 |
msgstr "is geen valide IPv4 of IPv6 ip adres."
|
40 |
|
41 |
-
#: libs/blockcountry-settings.php:
|
42 |
msgid "IP Adress"
|
43 |
msgstr "IP Adres"
|
44 |
|
45 |
-
#: libs/blockcountry-settings.php:
|
46 |
msgid "belongs to"
|
47 |
msgstr "behoort tot"
|
48 |
|
49 |
-
#: libs/blockcountry-settings.php:
|
50 |
msgid "This country is not permitted to visit the frontend of this website."
|
51 |
msgstr ""
|
52 |
"Dit land wordt niet toegestaan om de voorkant van deze website te bezoeken."
|
53 |
|
54 |
-
#: libs/blockcountry-settings.php:
|
55 |
msgid "This country is not permitted to visit the backend of this website."
|
56 |
msgstr ""
|
57 |
"Dit land wordt niet toegestaan om de achterkant van deze website te bezoeken."
|
58 |
|
59 |
-
#: libs/blockcountry-settings.php:
|
60 |
msgid "This ip is present in the blacklist."
|
61 |
msgstr "Dit ip adres staat op de zwarte lijst"
|
62 |
|
63 |
-
#: libs/blockcountry-settings.php:
|
64 |
msgid "Check IP address"
|
65 |
msgstr "Controleer IP adres"
|
66 |
|
67 |
-
#: libs/blockcountry-settings.php:
|
68 |
msgid "Download GeoIP database"
|
69 |
msgstr "Download GeoIP database"
|
70 |
|
71 |
-
#: libs/blockcountry-settings.php:
|
|
|
|
|
|
|
|
|
72 |
msgid "The GeoIP database is updated once a month. Last update: "
|
73 |
msgstr ""
|
74 |
"De GeoIP database wordt eenmaal per maand bijgewerkt. Laatste keer "
|
75 |
"bijgewerkt:"
|
76 |
|
77 |
-
#: libs/blockcountry-settings.php:
|
78 |
msgid "If you need a manual update please press buttons below to update."
|
79 |
msgstr "Indien je handmatig wilt bijwerken druk je op de knoppen hier beneden."
|
80 |
|
81 |
-
#: libs/blockcountry-settings.php:
|
82 |
msgid "Download new GeoIP IPv4 Database"
|
83 |
msgstr "Download nieuwe GeoIP IPv4 database"
|
84 |
|
85 |
-
#: libs/blockcountry-settings.php:
|
86 |
msgid "Download new GeoIP IPv6 Database"
|
87 |
msgstr "Download nieuwe GeoIP IPv6 database"
|
88 |
|
89 |
-
#: libs/blockcountry-settings.php:
|
90 |
msgid "Downloading..."
|
91 |
msgstr "Downloading..."
|
92 |
|
93 |
-
#: libs/blockcountry-settings.php:
|
94 |
msgid "Active plugins"
|
95 |
msgstr "Actieve plugins"
|
96 |
|
97 |
-
#: libs/blockcountry-settings.php:
|
98 |
msgid "Plugin name"
|
99 |
msgstr "Plugin naam"
|
100 |
|
101 |
-
#: libs/blockcountry-settings.php:
|
102 |
msgid "Version"
|
103 |
msgstr "Versie"
|
104 |
|
105 |
-
#: libs/blockcountry-settings.php:
|
106 |
-
#: libs/blockcountry-settings.php:
|
107 |
msgid "URL"
|
108 |
msgstr "URL"
|
109 |
|
110 |
-
#: libs/blockcountry-settings.php:
|
111 |
msgid "Export"
|
112 |
msgstr "Exporteren"
|
113 |
|
114 |
-
#: libs/blockcountry-settings.php:
|
115 |
msgid ""
|
116 |
"When you click on <tt>Backup all settings</tt> button a backup of the iQ "
|
117 |
"Block Country configuration will be created."
|
@@ -119,7 +123,7 @@ msgstr ""
|
|
119 |
"Wanneer je klikt op de <tt>Backup alle instellingen</tt> knop zal een backup "
|
120 |
"van alle iQ Block Country instellingen worden gecreerd."
|
121 |
|
122 |
-
#: libs/blockcountry-settings.php:
|
123 |
msgid ""
|
124 |
"After exporting, you can either use the backup file to restore your settings "
|
125 |
"on this site again or copy the settings to another WordPress site."
|
@@ -128,95 +132,95 @@ msgstr ""
|
|
128 |
"te herstellen of je kunt het bestand gebruiken om je instellingen naar een "
|
129 |
"andere WordPress site te exporteren."
|
130 |
|
131 |
-
#: libs/blockcountry-settings.php:
|
132 |
msgid "Backup all settings"
|
133 |
msgstr "Backup alle instellingen"
|
134 |
|
135 |
-
#: libs/blockcountry-settings.php:
|
136 |
msgid "Import"
|
137 |
msgstr "Importeer"
|
138 |
|
139 |
-
#: libs/blockcountry-settings.php:
|
140 |
msgid "Click the browse button and choose a zip file that you exported before."
|
141 |
msgstr ""
|
142 |
"Klik op de Browse button and selecteer een zip file welke je eerder hebt "
|
143 |
"geexporteerd."
|
144 |
|
145 |
-
#: libs/blockcountry-settings.php:
|
146 |
msgid "Press Restore settings button, and let WordPress do the magic for you."
|
147 |
msgstr ""
|
148 |
"Druk op de herstel instellingen knop en laat WordPress haar magie voor je "
|
149 |
"doen."
|
150 |
|
151 |
-
#: libs/blockcountry-settings.php:
|
152 |
msgid "Restore settings"
|
153 |
msgstr "Herstel instellingen"
|
154 |
|
155 |
-
#: libs/blockcountry-settings.php:
|
156 |
-
#: libs/blockcountry-settings.php:
|
157 |
msgid "Something went wrong exporting this file"
|
158 |
msgstr "Er is iets verkeerd gegaan met het exporteren van het bestand."
|
159 |
|
160 |
-
#: libs/blockcountry-settings.php:
|
161 |
msgid "Exporting settings..."
|
162 |
msgstr "Exporteer instellingen"
|
163 |
|
164 |
-
#: libs/blockcountry-settings.php:
|
165 |
msgid "Something went wrong importing this file"
|
166 |
msgstr "Er is iets verkeerd gegaan met het importeren van dit bestand"
|
167 |
|
168 |
-
#: libs/blockcountry-settings.php:
|
169 |
msgid "All options are restored successfully."
|
170 |
msgstr "Alle opties zijn succesvol hersteld"
|
171 |
|
172 |
-
#: libs/blockcountry-settings.php:
|
173 |
msgid "Invalid file."
|
174 |
msgstr "Ongeldig bestand"
|
175 |
|
176 |
-
#: libs/blockcountry-settings.php:
|
177 |
msgid "No correct import or export option given."
|
178 |
msgstr "Geen correcte importeer of exporteer optie gegeven."
|
179 |
|
180 |
-
#: libs/blockcountry-settings.php:
|
181 |
msgid "Select which pages are blocked."
|
182 |
msgstr "Selecteer welke pagina's geblokkeerd worden."
|
183 |
|
184 |
-
#: libs/blockcountry-settings.php:
|
185 |
msgid "Do you want to block individual pages:"
|
186 |
msgstr "Wil je individuele pagina's blokkeren:"
|
187 |
|
188 |
-
#: libs/blockcountry-settings.php:
|
189 |
msgid "If you do not select this option all pages will be blocked."
|
190 |
msgstr "Indien je deze optie niet selecteert worden alle pagina's geblokkeerd."
|
191 |
|
192 |
-
#: libs/blockcountry-settings.php:
|
193 |
msgid "Select pages you want to block:"
|
194 |
msgstr "Selecteer welke pagina's je wil blokkeren."
|
195 |
|
196 |
-
#: libs/blockcountry-settings.php:
|
197 |
-
#: libs/blockcountry-settings.php:
|
198 |
-
#: libs/blockcountry-settings.php:
|
199 |
msgid "Save Changes"
|
200 |
msgstr "Bewaar wijzigingen"
|
201 |
|
202 |
-
#: libs/blockcountry-settings.php:
|
203 |
msgid "Select which categories are blocked."
|
204 |
msgstr "Selecteer welke categorieen geblokkeerd worden."
|
205 |
|
206 |
-
#: libs/blockcountry-settings.php:
|
207 |
msgid "Do you want to block individual categories:"
|
208 |
msgstr "Wil je individuele categorieen blokkeren:"
|
209 |
|
210 |
-
#: libs/blockcountry-settings.php:
|
211 |
msgid "If you do not select this option all blog articles will be blocked."
|
212 |
msgstr ""
|
213 |
"Indien je deze optie niet selecteert worden alle blog artikelen geblokkeerd."
|
214 |
|
215 |
-
#: libs/blockcountry-settings.php:
|
216 |
msgid "Do you want to block the homepage:"
|
217 |
msgstr "Wil je je homepage blokkeren:"
|
218 |
|
219 |
-
#: libs/blockcountry-settings.php:
|
220 |
msgid ""
|
221 |
"If you do not select this option visitors will not be blocked from your "
|
222 |
"homepage regardless of the categories you select."
|
@@ -225,19 +229,19 @@ msgstr ""
|
|
225 |
"geblokkeerd van het bezoeken van je homepagina ongeacht welke categorieen je "
|
226 |
"selecteert."
|
227 |
|
228 |
-
#: libs/blockcountry-settings.php:
|
229 |
msgid "Select categories you want to block:"
|
230 |
msgstr "Selecteer welke categorieen je wil blokkeren."
|
231 |
|
232 |
-
#: libs/blockcountry-settings.php:
|
233 |
msgid "Select which search engines are allowed."
|
234 |
msgstr "Selecteer welke zoek machines je wilt toestaan."
|
235 |
|
236 |
-
#: libs/blockcountry-settings.php:
|
237 |
msgid "Select which search engines you want to allow:"
|
238 |
msgstr "Selecteer welke zoek machines je wilt toestaan:"
|
239 |
|
240 |
-
#: libs/blockcountry-settings.php:
|
241 |
msgid ""
|
242 |
"This will allow a search engine to your site despite if you blocked the "
|
243 |
"country."
|
@@ -245,66 +249,66 @@ msgstr ""
|
|
245 |
"Deze optie staat het toe dat zoekmachines je site bezoeken ondanks dat ze "
|
246 |
"uit een land komen welk geblokkeerd is."
|
247 |
|
248 |
-
#: libs/blockcountry-settings.php:
|
249 |
msgid "Frontend options"
|
250 |
msgstr "Voorkant opties"
|
251 |
|
252 |
-
#: libs/blockcountry-settings.php:
|
253 |
msgid ""
|
254 |
"Do not block visitors that are logged in from visiting frontend website:"
|
255 |
msgstr ""
|
256 |
"Blokkeer geen bezoekers welke ingelogd zijn van het bezoeken van de voorkant:"
|
257 |
|
258 |
-
#: libs/blockcountry-settings.php:
|
259 |
msgid "Block visitors from visiting the frontend of your website:"
|
260 |
msgstr "Blokkeer bezoekers van het bezoeken van de voorkant van je website:"
|
261 |
|
262 |
-
#: libs/blockcountry-settings.php:
|
263 |
msgid ""
|
264 |
"Select the countries that should be blocked from visiting your frontend:"
|
265 |
msgstr ""
|
266 |
"Selecteer de landen welke geblokkeerd moeten worden voor het bezoeken van de "
|
267 |
"voorkant van je website:"
|
268 |
|
269 |
-
#: libs/blockcountry-settings.php:
|
270 |
msgid "Use the CTRL key to select multiple countries"
|
271 |
msgstr "Gebruik de CTRL toets om meerdere landen te selecteren"
|
272 |
|
273 |
-
#: libs/blockcountry-settings.php:
|
274 |
msgid "Frontend whitelist IPv4 and/or IPv6 addresses:"
|
275 |
msgstr ""
|
276 |
"Whitelist van IPv4 of IPv6 IP adressen voor de voorkant van je website:"
|
277 |
|
278 |
-
#: libs/blockcountry-settings.php:
|
279 |
-
#: libs/blockcountry-settings.php:
|
280 |
msgid "Use a semicolon (;) to separate IP addresses"
|
281 |
msgstr "Gebruik een puntkomma (;) om adressen van elkaar te scheiden"
|
282 |
|
283 |
-
#: libs/blockcountry-settings.php:
|
284 |
msgid "Frontend blacklist IPv4 and/or IPv6 addresses:"
|
285 |
msgstr ""
|
286 |
"Blacklist van IPv4 of IPv6 IP adressen voor de voorkant van je website:"
|
287 |
|
288 |
-
#: libs/blockcountry-settings.php:
|
289 |
msgid "Backend Options"
|
290 |
msgstr "Achterkant opties"
|
291 |
|
292 |
-
#: libs/blockcountry-settings.php:
|
293 |
msgid ""
|
294 |
"Block visitors from visiting the backend (administrator) of your website:"
|
295 |
msgstr ""
|
296 |
"Blokkeer bezoekers van het bezoeken van de achterkant (administratie "
|
297 |
"gedeelte) van je website:"
|
298 |
|
299 |
-
#: libs/blockcountry-settings.php:
|
300 |
msgid "Your IP address is"
|
301 |
msgstr "Je IP adres is"
|
302 |
|
303 |
-
#: libs/blockcountry-settings.php:
|
304 |
msgid "The country that is listed for this IP address is"
|
305 |
msgstr "Het land waar dit adres toe behoort is"
|
306 |
|
307 |
-
#: libs/blockcountry-settings.php:
|
308 |
msgid ""
|
309 |
"Do <strong>NOT</strong> set the 'Block visitors from visiting the backend "
|
310 |
"(administrator) of your website' and also select"
|
@@ -312,11 +316,11 @@ msgstr ""
|
|
312 |
"Selecteer <strong>NIET</strong> \"Blokkeer bezoekers van het bezoeken van de "
|
313 |
"achterkant (administratie gedeelte) van je website\" en"
|
314 |
|
315 |
-
#: libs/blockcountry-settings.php:
|
316 |
msgid "below."
|
317 |
msgstr "hier beneden."
|
318 |
|
319 |
-
#: libs/blockcountry-settings.php:
|
320 |
msgid ""
|
321 |
"You will NOT be able to login the next time if you DO block your own country "
|
322 |
"from visiting the backend."
|
@@ -324,52 +328,52 @@ msgstr ""
|
|
324 |
"Het zal daarna niet meer mogelijk zijn om nog in te loggen als je je eigen "
|
325 |
"land blokkeert van het bezoeken van de achterkant van je website."
|
326 |
|
327 |
-
#: libs/blockcountry-settings.php:
|
328 |
msgid "Select the countries that should be blocked from visiting your backend:"
|
329 |
msgstr ""
|
330 |
"Selecteer de landen welke geblokkeerd moeten worden voor het bezoeken van de "
|
331 |
"achterkant (administratie gedeelte) van je website:"
|
332 |
|
333 |
-
#: libs/blockcountry-settings.php:
|
334 |
msgid "Use the x behind the country to remove a country from this blocklist."
|
335 |
msgstr ""
|
336 |
"Gebruik de x achter een land om het land te verwijderen uit deze lijst."
|
337 |
|
338 |
-
#: libs/blockcountry-settings.php:
|
339 |
msgid "Backend whitelist IPv4 and/or IPv6 addresses:"
|
340 |
msgstr ""
|
341 |
"Whitelist van IPv4 of IPv6 IP adressen voor de achterkant van je website:"
|
342 |
|
343 |
-
#: libs/blockcountry-settings.php:
|
344 |
msgid "Backend blacklist IPv4 and/or IPv6 addresses:"
|
345 |
msgstr ""
|
346 |
"Blacklist van IPv4 of IPv6 IP adressen voor de achterkant van je website:"
|
347 |
|
348 |
-
#: libs/blockcountry-settings.php:
|
349 |
msgid "Overall statistics since start"
|
350 |
msgstr "Statistieken sinds het begin"
|
351 |
|
352 |
-
#: libs/blockcountry-settings.php:
|
353 |
msgid "visitors blocked from the backend."
|
354 |
msgstr "bezoekers geblokkeerd op de achterkant."
|
355 |
|
356 |
-
#: libs/blockcountry-settings.php:
|
357 |
msgid "visitors blocked from the frontend."
|
358 |
msgstr "bezoekers geblokkeerd op de voorkant."
|
359 |
|
360 |
-
#: libs/blockcountry-settings.php:
|
361 |
msgid "Basic Options"
|
362 |
msgstr "Standaard opties"
|
363 |
|
364 |
-
#: libs/blockcountry-settings.php:
|
365 |
msgid "Message to display when people are blocked:"
|
366 |
msgstr "Welk bericht wil je tonen aan bezoekers welke geblokkeerd worden:"
|
367 |
|
368 |
-
#: libs/blockcountry-settings.php:
|
369 |
msgid "Page to redirect to:"
|
370 |
msgstr "Naar welke pagina wilt u bezoekers toesturen:"
|
371 |
|
372 |
-
#: libs/blockcountry-settings.php:
|
373 |
msgid ""
|
374 |
"If you select a page here blocked visitors will be redirected to this page "
|
375 |
"instead of displaying above block message."
|
@@ -378,15 +382,15 @@ msgstr ""
|
|
378 |
"doorgestuurd naar deze pagina anders wordt bovestaande tekst getoond aan "
|
379 |
"bezoekers."
|
380 |
|
381 |
-
#: libs/blockcountry-settings.php:
|
382 |
msgid "Choose a page..."
|
383 |
msgstr "Kies een pagina..."
|
384 |
|
385 |
-
#: libs/blockcountry-settings.php:
|
386 |
msgid "Send headers when user is blocked:"
|
387 |
msgstr "Stuur headers wanneer een gebruiker is geblokkeerd:"
|
388 |
|
389 |
-
#: libs/blockcountry-settings.php:
|
390 |
msgid ""
|
391 |
"Under normal circumstances you should keep this selected! Only if you have "
|
392 |
"\"Cannot modify header information - headers already sent\" errors or if you "
|
@@ -396,19 +400,19 @@ msgstr ""
|
|
396 |
"deze alleen indien je \"Cannot modify header information - headers already "
|
397 |
"sent\" foutmeldingen krijgt of indien je weet wat je doet."
|
398 |
|
399 |
-
#: libs/blockcountry-settings.php:
|
400 |
msgid "Number of rows on statistics page:"
|
401 |
msgstr "Aantal regels op de statistieken pagina:"
|
402 |
|
403 |
-
#: libs/blockcountry-settings.php:
|
404 |
msgid "How many rows do you want to display on each tab the statistics page."
|
405 |
msgstr "Hoeveel regels wil je tonen op de statistieken pagina."
|
406 |
|
407 |
-
#: libs/blockcountry-settings.php:
|
408 |
msgid "Allow tracking:"
|
409 |
msgstr "Sta traceren toe:"
|
410 |
|
411 |
-
#: libs/blockcountry-settings.php:
|
412 |
msgid ""
|
413 |
"This sends only the IP address and the number of attempts this ip address "
|
414 |
"tried to login to your backend and was blocked doing so to a central server. "
|
@@ -421,104 +425,128 @@ msgstr ""
|
|
421 |
"ons om beter inzicht te krijgen in de landen waarvandaan een hoop hack "
|
422 |
"pogingen worden gedaan. "
|
423 |
|
424 |
-
#: libs/blockcountry-settings.php:
|
425 |
msgid "API Key:"
|
426 |
msgstr "API Key:"
|
427 |
|
428 |
-
#: libs/blockcountry-settings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
msgid "Last blocked visits"
|
430 |
msgstr "Laatste geblokkeerde bezoekers"
|
431 |
|
432 |
-
#: libs/blockcountry-settings.php:
|
433 |
msgid "Date / Time"
|
434 |
msgstr "Datum / Tijd"
|
435 |
|
436 |
-
#: libs/blockcountry-settings.php:
|
437 |
msgid "IP Address"
|
438 |
msgstr "IP adres"
|
439 |
|
440 |
-
#: libs/blockcountry-settings.php:
|
441 |
msgid "Hostname"
|
442 |
msgstr "Hostnaam"
|
443 |
|
444 |
-
#: libs/blockcountry-settings.php:
|
445 |
msgid "Country"
|
446 |
msgstr "Land"
|
447 |
|
448 |
-
#: libs/blockcountry-settings.php:
|
449 |
msgid "Frontend/Backend"
|
450 |
msgstr "Voorkant/Achterkant"
|
451 |
|
452 |
-
#: libs/blockcountry-settings.php:
|
453 |
msgid "Frontend"
|
454 |
msgstr "Voorkant"
|
455 |
|
456 |
-
#: libs/blockcountry-settings.php:
|
457 |
msgid "Backend banlist"
|
458 |
msgstr "Achterkant banlist"
|
459 |
|
460 |
-
#: libs/blockcountry-settings.php:
|
461 |
msgid "Backend & Backend banlist"
|
462 |
msgstr "Achterkant & Achterkant banlist"
|
463 |
|
464 |
-
#: libs/blockcountry-settings.php:
|
465 |
msgid "Backend"
|
466 |
msgstr "Achterkant"
|
467 |
|
468 |
-
#: libs/blockcountry-settings.php:
|
469 |
msgid "Top countries that are blocked"
|
470 |
msgstr "Top landen welke zijn geblokkeerd"
|
471 |
|
472 |
-
#: libs/blockcountry-settings.php:
|
473 |
-
#: libs/blockcountry-settings.php:
|
474 |
msgid "# of blocked attempts"
|
475 |
msgstr "# of geblokkeerde pogingen"
|
476 |
|
477 |
-
#: libs/blockcountry-settings.php:
|
478 |
msgid "Top hosts that are blocked"
|
479 |
msgstr "Top hosts welke geblokkeerd zijn"
|
480 |
|
481 |
-
#: libs/blockcountry-settings.php:
|
482 |
msgid "Top URLs that are blocked"
|
483 |
msgstr "Top URLs welke geblokkeerd zijn"
|
484 |
|
485 |
-
#: libs/blockcountry-settings.php:
|
486 |
msgid "Home"
|
487 |
msgstr "Home"
|
488 |
|
489 |
-
#: libs/blockcountry-settings.php:
|
490 |
msgid "Pages"
|
491 |
msgstr "Pagina's"
|
492 |
|
493 |
-
#: libs/blockcountry-settings.php:
|
494 |
msgid "Categories"
|
495 |
msgstr "Categorieen"
|
496 |
|
497 |
-
#: libs/blockcountry-settings.php:
|
498 |
msgid "Search Engines"
|
499 |
msgstr "Zoek machines"
|
500 |
|
501 |
-
#: libs/blockcountry-settings.php:
|
502 |
msgid "Tools"
|
503 |
msgstr "Gereedschap"
|
504 |
|
505 |
-
#: libs/blockcountry-settings.php:
|
506 |
msgid "Logging"
|
507 |
msgstr "Statistieken"
|
508 |
|
509 |
-
#: libs/blockcountry-settings.php:
|
510 |
msgid "Import/Export"
|
511 |
msgstr "Importeren/Exporteren"
|
512 |
|
513 |
-
#: libs/blockcountry-settings.php:
|
514 |
msgid "GeoIP database does not exists. Trying to download it..."
|
515 |
msgstr "GeoIP database bestaat niet. Probeer om nieuwe versie te downloaden"
|
516 |
|
517 |
-
#:
|
|
|
518 |
msgid "Error occured: Could not download the GeoIP database from"
|
519 |
msgstr "Uh oh: Kon de GeoIP database niet downloaden van"
|
520 |
|
521 |
-
#:
|
522 |
msgid ""
|
523 |
"MaxMind has blocked requests from your IP address for 24 hours. Please check "
|
524 |
"again in 24 hours or download this file from your own PC"
|
@@ -526,11 +554,11 @@ msgstr ""
|
|
526 |
"MaxMind heeft alle verzoeken vanaf dit IP adres voor 24 uur geblokkeerd. "
|
527 |
"Controleer nogmaals na 24 uur of download dit bestand via je eigen pc"
|
528 |
|
529 |
-
#:
|
530 |
msgid "Unzip this file and upload it (via FTP for instance) to:"
|
531 |
msgstr "Pak dit bestand uit en upload deze (via FTP bijvoorbeeld) naar:"
|
532 |
|
533 |
-
#:
|
534 |
msgid ""
|
535 |
"Please download this file from your own PC unzip this file and upload it "
|
536 |
"(via FTP for instance) to:"
|
@@ -538,15 +566,15 @@ msgstr ""
|
|
538 |
"Download dit bestand alsjeblieft naar je eigen PC. Pak het bestand daar uit "
|
539 |
"en upload deze (bijvoorbeeld via FTP) naar:"
|
540 |
|
541 |
-
#:
|
542 |
msgid "Finished downloading"
|
543 |
msgstr "Klaar met downloaden"
|
544 |
|
545 |
-
#:
|
546 |
msgid "Fatal error: GeoIP"
|
547 |
msgstr "Fatale fout: GeoIP"
|
548 |
|
549 |
-
#:
|
550 |
msgid ""
|
551 |
"database does not exists. This plugin will not work until the database file "
|
552 |
"is present."
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: iQ Block Country\n"
|
4 |
+
"POT-Creation-Date: 2014-09-02 09:51+0100\n"
|
5 |
+
"PO-Revision-Date: 2014-09-02 09:53+0100\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: iQ Block Country <info@redeo.nl>\n"
|
8 |
"Language: Dutch\n"
|
15 |
"X-Poedit-SearchPath-0: libs\n"
|
16 |
"X-Poedit-SearchPath-1: .\n"
|
17 |
|
18 |
+
#: libs/blockcountry-settings.php:130
|
19 |
msgid ""
|
20 |
"Check which country belongs to an IP Address according to the current "
|
21 |
"database."
|
22 |
msgstr ""
|
23 |
"Controleer welk land behoort tot een IP adres volgens de huidige database."
|
24 |
|
25 |
+
#: libs/blockcountry-settings.php:134
|
26 |
msgid "IP Address to check:"
|
27 |
msgstr "IP adres om te controleren:"
|
28 |
|
29 |
+
#: libs/blockcountry-settings.php:144
|
30 |
msgid "No country for"
|
31 |
msgstr "Geen land voor"
|
32 |
|
33 |
+
#: libs/blockcountry-settings.php:144
|
34 |
msgid "could be found. Or"
|
35 |
msgstr "gevonden. Of"
|
36 |
|
37 |
+
#: libs/blockcountry-settings.php:144
|
38 |
msgid "is not a valid IPv4 or IPv6 IP address"
|
39 |
msgstr "is geen valide IPv4 of IPv6 ip adres."
|
40 |
|
41 |
+
#: libs/blockcountry-settings.php:149
|
42 |
msgid "IP Adress"
|
43 |
msgstr "IP Adres"
|
44 |
|
45 |
+
#: libs/blockcountry-settings.php:149
|
46 |
msgid "belongs to"
|
47 |
msgstr "behoort tot"
|
48 |
|
49 |
+
#: libs/blockcountry-settings.php:152
|
50 |
msgid "This country is not permitted to visit the frontend of this website."
|
51 |
msgstr ""
|
52 |
"Dit land wordt niet toegestaan om de voorkant van deze website te bezoeken."
|
53 |
|
54 |
+
#: libs/blockcountry-settings.php:157
|
55 |
msgid "This country is not permitted to visit the backend of this website."
|
56 |
msgstr ""
|
57 |
"Dit land wordt niet toegestaan om de achterkant van deze website te bezoeken."
|
58 |
|
59 |
+
#: libs/blockcountry-settings.php:162
|
60 |
msgid "This ip is present in the blacklist."
|
61 |
msgstr "Dit ip adres staat op de zwarte lijst"
|
62 |
|
63 |
+
#: libs/blockcountry-settings.php:168
|
64 |
msgid "Check IP address"
|
65 |
msgstr "Controleer IP adres"
|
66 |
|
67 |
+
#: libs/blockcountry-settings.php:174
|
68 |
msgid "Download GeoIP database"
|
69 |
msgstr "Download GeoIP database"
|
70 |
|
71 |
+
#: libs/blockcountry-settings.php:182
|
72 |
+
msgid "Automatic update is not setup. Last update: "
|
73 |
+
msgstr "Automatisch updaten is niet geconfigureerd. Laatste update:"
|
74 |
+
|
75 |
+
#: libs/blockcountry-settings.php:187
|
76 |
msgid "The GeoIP database is updated once a month. Last update: "
|
77 |
msgstr ""
|
78 |
"De GeoIP database wordt eenmaal per maand bijgewerkt. Laatste keer "
|
79 |
"bijgewerkt:"
|
80 |
|
81 |
+
#: libs/blockcountry-settings.php:189
|
82 |
msgid "If you need a manual update please press buttons below to update."
|
83 |
msgstr "Indien je handmatig wilt bijwerken druk je op de knoppen hier beneden."
|
84 |
|
85 |
+
#: libs/blockcountry-settings.php:195
|
86 |
msgid "Download new GeoIP IPv4 Database"
|
87 |
msgstr "Download nieuwe GeoIP IPv4 database"
|
88 |
|
89 |
+
#: libs/blockcountry-settings.php:202
|
90 |
msgid "Download new GeoIP IPv6 Database"
|
91 |
msgstr "Download nieuwe GeoIP IPv6 database"
|
92 |
|
93 |
+
#: libs/blockcountry-settings.php:207 libs/blockcountry-settings.php:211
|
94 |
msgid "Downloading..."
|
95 |
msgstr "Downloading..."
|
96 |
|
97 |
+
#: libs/blockcountry-settings.php:217
|
98 |
msgid "Active plugins"
|
99 |
msgstr "Actieve plugins"
|
100 |
|
101 |
+
#: libs/blockcountry-settings.php:224
|
102 |
msgid "Plugin name"
|
103 |
msgstr "Plugin naam"
|
104 |
|
105 |
+
#: libs/blockcountry-settings.php:224
|
106 |
msgid "Version"
|
107 |
msgstr "Versie"
|
108 |
|
109 |
+
#: libs/blockcountry-settings.php:224 libs/blockcountry-settings.php:867
|
110 |
+
#: libs/blockcountry-settings.php:910
|
111 |
msgid "URL"
|
112 |
msgstr "URL"
|
113 |
|
114 |
+
#: libs/blockcountry-settings.php:249
|
115 |
msgid "Export"
|
116 |
msgstr "Exporteren"
|
117 |
|
118 |
+
#: libs/blockcountry-settings.php:250
|
119 |
msgid ""
|
120 |
"When you click on <tt>Backup all settings</tt> button a backup of the iQ "
|
121 |
"Block Country configuration will be created."
|
123 |
"Wanneer je klikt op de <tt>Backup alle instellingen</tt> knop zal een backup "
|
124 |
"van alle iQ Block Country instellingen worden gecreerd."
|
125 |
|
126 |
+
#: libs/blockcountry-settings.php:251
|
127 |
msgid ""
|
128 |
"After exporting, you can either use the backup file to restore your settings "
|
129 |
"on this site again or copy the settings to another WordPress site."
|
132 |
"te herstellen of je kunt het bestand gebruiken om je instellingen naar een "
|
133 |
"andere WordPress site te exporteren."
|
134 |
|
135 |
+
#: libs/blockcountry-settings.php:255
|
136 |
msgid "Backup all settings"
|
137 |
msgstr "Backup alle instellingen"
|
138 |
|
139 |
+
#: libs/blockcountry-settings.php:262
|
140 |
msgid "Import"
|
141 |
msgstr "Importeer"
|
142 |
|
143 |
+
#: libs/blockcountry-settings.php:263
|
144 |
msgid "Click the browse button and choose a zip file that you exported before."
|
145 |
msgstr ""
|
146 |
"Klik op de Browse button and selecteer een zip file welke je eerder hebt "
|
147 |
"geexporteerd."
|
148 |
|
149 |
+
#: libs/blockcountry-settings.php:264
|
150 |
msgid "Press Restore settings button, and let WordPress do the magic for you."
|
151 |
msgstr ""
|
152 |
"Druk op de herstel instellingen knop en laat WordPress haar magie voor je "
|
153 |
"doen."
|
154 |
|
155 |
+
#: libs/blockcountry-settings.php:269
|
156 |
msgid "Restore settings"
|
157 |
msgstr "Herstel instellingen"
|
158 |
|
159 |
+
#: libs/blockcountry-settings.php:292 libs/blockcountry-settings.php:295
|
160 |
+
#: libs/blockcountry-settings.php:304
|
161 |
msgid "Something went wrong exporting this file"
|
162 |
msgstr "Er is iets verkeerd gegaan met het exporteren van het bestand."
|
163 |
|
164 |
+
#: libs/blockcountry-settings.php:307
|
165 |
msgid "Exporting settings..."
|
166 |
msgstr "Exporteer instellingen"
|
167 |
|
168 |
+
#: libs/blockcountry-settings.php:322
|
169 |
msgid "Something went wrong importing this file"
|
170 |
msgstr "Er is iets verkeerd gegaan met het importeren van dit bestand"
|
171 |
|
172 |
+
#: libs/blockcountry-settings.php:339
|
173 |
msgid "All options are restored successfully."
|
174 |
msgstr "Alle opties zijn succesvol hersteld"
|
175 |
|
176 |
+
#: libs/blockcountry-settings.php:342
|
177 |
msgid "Invalid file."
|
178 |
msgstr "Ongeldig bestand"
|
179 |
|
180 |
+
#: libs/blockcountry-settings.php:347
|
181 |
msgid "No correct import or export option given."
|
182 |
msgstr "Geen correcte importeer of exporteer optie gegeven."
|
183 |
|
184 |
+
#: libs/blockcountry-settings.php:356
|
185 |
msgid "Select which pages are blocked."
|
186 |
msgstr "Selecteer welke pagina's geblokkeerd worden."
|
187 |
|
188 |
+
#: libs/blockcountry-settings.php:363
|
189 |
msgid "Do you want to block individual pages:"
|
190 |
msgstr "Wil je individuele pagina's blokkeren:"
|
191 |
|
192 |
+
#: libs/blockcountry-settings.php:364
|
193 |
msgid "If you do not select this option all pages will be blocked."
|
194 |
msgstr "Indien je deze optie niet selecteert worden alle pagina's geblokkeerd."
|
195 |
|
196 |
+
#: libs/blockcountry-settings.php:369
|
197 |
msgid "Select pages you want to block:"
|
198 |
msgstr "Selecteer welke pagina's je wil blokkeren."
|
199 |
|
200 |
+
#: libs/blockcountry-settings.php:391 libs/blockcountry-settings.php:445
|
201 |
+
#: libs/blockcountry-settings.php:488 libs/blockcountry-settings.php:584
|
202 |
+
#: libs/blockcountry-settings.php:688 libs/blockcountry-settings.php:839
|
203 |
msgid "Save Changes"
|
204 |
msgstr "Bewaar wijzigingen"
|
205 |
|
206 |
+
#: libs/blockcountry-settings.php:404
|
207 |
msgid "Select which categories are blocked."
|
208 |
msgstr "Selecteer welke categorieen geblokkeerd worden."
|
209 |
|
210 |
+
#: libs/blockcountry-settings.php:411
|
211 |
msgid "Do you want to block individual categories:"
|
212 |
msgstr "Wil je individuele categorieen blokkeren:"
|
213 |
|
214 |
+
#: libs/blockcountry-settings.php:412
|
215 |
msgid "If you do not select this option all blog articles will be blocked."
|
216 |
msgstr ""
|
217 |
"Indien je deze optie niet selecteert worden alle blog artikelen geblokkeerd."
|
218 |
|
219 |
+
#: libs/blockcountry-settings.php:417
|
220 |
msgid "Do you want to block the homepage:"
|
221 |
msgstr "Wil je je homepage blokkeren:"
|
222 |
|
223 |
+
#: libs/blockcountry-settings.php:418
|
224 |
msgid ""
|
225 |
"If you do not select this option visitors will not be blocked from your "
|
226 |
"homepage regardless of the categories you select."
|
229 |
"geblokkeerd van het bezoeken van je homepagina ongeacht welke categorieen je "
|
230 |
"selecteert."
|
231 |
|
232 |
+
#: libs/blockcountry-settings.php:423
|
233 |
msgid "Select categories you want to block:"
|
234 |
msgstr "Selecteer welke categorieen je wil blokkeren."
|
235 |
|
236 |
+
#: libs/blockcountry-settings.php:458
|
237 |
msgid "Select which search engines are allowed."
|
238 |
msgstr "Selecteer welke zoek machines je wilt toestaan."
|
239 |
|
240 |
+
#: libs/blockcountry-settings.php:465
|
241 |
msgid "Select which search engines you want to allow:"
|
242 |
msgstr "Selecteer welke zoek machines je wilt toestaan:"
|
243 |
|
244 |
+
#: libs/blockcountry-settings.php:466
|
245 |
msgid ""
|
246 |
"This will allow a search engine to your site despite if you blocked the "
|
247 |
"country."
|
249 |
"Deze optie staat het toe dat zoekmachines je site bezoeken ondanks dat ze "
|
250 |
"uit een land komen welk geblokkeerd is."
|
251 |
|
252 |
+
#: libs/blockcountry-settings.php:503
|
253 |
msgid "Frontend options"
|
254 |
msgstr "Voorkant opties"
|
255 |
|
256 |
+
#: libs/blockcountry-settings.php:538
|
257 |
msgid ""
|
258 |
"Do not block visitors that are logged in from visiting frontend website:"
|
259 |
msgstr ""
|
260 |
"Blokkeer geen bezoekers welke ingelogd zijn van het bezoeken van de voorkant:"
|
261 |
|
262 |
+
#: libs/blockcountry-settings.php:544
|
263 |
msgid "Block visitors from visiting the frontend of your website:"
|
264 |
msgstr "Blokkeer bezoekers van het bezoeken van de voorkant van je website:"
|
265 |
|
266 |
+
#: libs/blockcountry-settings.php:550
|
267 |
msgid ""
|
268 |
"Select the countries that should be blocked from visiting your frontend:"
|
269 |
msgstr ""
|
270 |
"Selecteer de landen welke geblokkeerd moeten worden voor het bezoeken van de "
|
271 |
"voorkant van je website:"
|
272 |
|
273 |
+
#: libs/blockcountry-settings.php:551
|
274 |
msgid "Use the CTRL key to select multiple countries"
|
275 |
msgstr "Gebruik de CTRL toets om meerdere landen te selecteren"
|
276 |
|
277 |
+
#: libs/blockcountry-settings.php:567
|
278 |
msgid "Frontend whitelist IPv4 and/or IPv6 addresses:"
|
279 |
msgstr ""
|
280 |
"Whitelist van IPv4 of IPv6 IP adressen voor de voorkant van je website:"
|
281 |
|
282 |
+
#: libs/blockcountry-settings.php:567 libs/blockcountry-settings.php:575
|
283 |
+
#: libs/blockcountry-settings.php:671 libs/blockcountry-settings.php:679
|
284 |
msgid "Use a semicolon (;) to separate IP addresses"
|
285 |
msgstr "Gebruik een puntkomma (;) om adressen van elkaar te scheiden"
|
286 |
|
287 |
+
#: libs/blockcountry-settings.php:575
|
288 |
msgid "Frontend blacklist IPv4 and/or IPv6 addresses:"
|
289 |
msgstr ""
|
290 |
"Blacklist van IPv4 of IPv6 IP adressen voor de voorkant van je website:"
|
291 |
|
292 |
+
#: libs/blockcountry-settings.php:604
|
293 |
msgid "Backend Options"
|
294 |
msgstr "Achterkant opties"
|
295 |
|
296 |
+
#: libs/blockcountry-settings.php:638
|
297 |
msgid ""
|
298 |
"Block visitors from visiting the backend (administrator) of your website:"
|
299 |
msgstr ""
|
300 |
"Blokkeer bezoekers van het bezoeken van de achterkant (administratie "
|
301 |
"gedeelte) van je website:"
|
302 |
|
303 |
+
#: libs/blockcountry-settings.php:646
|
304 |
msgid "Your IP address is"
|
305 |
msgstr "Je IP adres is"
|
306 |
|
307 |
+
#: libs/blockcountry-settings.php:646
|
308 |
msgid "The country that is listed for this IP address is"
|
309 |
msgstr "Het land waar dit adres toe behoort is"
|
310 |
|
311 |
+
#: libs/blockcountry-settings.php:647
|
312 |
msgid ""
|
313 |
"Do <strong>NOT</strong> set the 'Block visitors from visiting the backend "
|
314 |
"(administrator) of your website' and also select"
|
316 |
"Selecteer <strong>NIET</strong> \"Blokkeer bezoekers van het bezoeken van de "
|
317 |
"achterkant (administratie gedeelte) van je website\" en"
|
318 |
|
319 |
+
#: libs/blockcountry-settings.php:647
|
320 |
msgid "below."
|
321 |
msgstr "hier beneden."
|
322 |
|
323 |
+
#: libs/blockcountry-settings.php:648
|
324 |
msgid ""
|
325 |
"You will NOT be able to login the next time if you DO block your own country "
|
326 |
"from visiting the backend."
|
328 |
"Het zal daarna niet meer mogelijk zijn om nog in te loggen als je je eigen "
|
329 |
"land blokkeert van het bezoeken van de achterkant van je website."
|
330 |
|
331 |
+
#: libs/blockcountry-settings.php:653
|
332 |
msgid "Select the countries that should be blocked from visiting your backend:"
|
333 |
msgstr ""
|
334 |
"Selecteer de landen welke geblokkeerd moeten worden voor het bezoeken van de "
|
335 |
"achterkant (administratie gedeelte) van je website:"
|
336 |
|
337 |
+
#: libs/blockcountry-settings.php:654
|
338 |
msgid "Use the x behind the country to remove a country from this blocklist."
|
339 |
msgstr ""
|
340 |
"Gebruik de x achter een land om het land te verwijderen uit deze lijst."
|
341 |
|
342 |
+
#: libs/blockcountry-settings.php:671
|
343 |
msgid "Backend whitelist IPv4 and/or IPv6 addresses:"
|
344 |
msgstr ""
|
345 |
"Whitelist van IPv4 of IPv6 IP adressen voor de achterkant van je website:"
|
346 |
|
347 |
+
#: libs/blockcountry-settings.php:679
|
348 |
msgid "Backend blacklist IPv4 and/or IPv6 addresses:"
|
349 |
msgstr ""
|
350 |
"Blacklist van IPv4 of IPv6 IP adressen voor de achterkant van je website:"
|
351 |
|
352 |
+
#: libs/blockcountry-settings.php:709
|
353 |
msgid "Overall statistics since start"
|
354 |
msgstr "Statistieken sinds het begin"
|
355 |
|
356 |
+
#: libs/blockcountry-settings.php:712
|
357 |
msgid "visitors blocked from the backend."
|
358 |
msgstr "bezoekers geblokkeerd op de achterkant."
|
359 |
|
360 |
+
#: libs/blockcountry-settings.php:714
|
361 |
msgid "visitors blocked from the frontend."
|
362 |
msgstr "bezoekers geblokkeerd op de voorkant."
|
363 |
|
364 |
+
#: libs/blockcountry-settings.php:718
|
365 |
msgid "Basic Options"
|
366 |
msgstr "Standaard opties"
|
367 |
|
368 |
+
#: libs/blockcountry-settings.php:753
|
369 |
msgid "Message to display when people are blocked:"
|
370 |
msgstr "Welk bericht wil je tonen aan bezoekers welke geblokkeerd worden:"
|
371 |
|
372 |
+
#: libs/blockcountry-settings.php:763
|
373 |
msgid "Page to redirect to:"
|
374 |
msgstr "Naar welke pagina wilt u bezoekers toesturen:"
|
375 |
|
376 |
+
#: libs/blockcountry-settings.php:764
|
377 |
msgid ""
|
378 |
"If you select a page here blocked visitors will be redirected to this page "
|
379 |
"instead of displaying above block message."
|
382 |
"doorgestuurd naar deze pagina anders wordt bovestaande tekst getoond aan "
|
383 |
"bezoekers."
|
384 |
|
385 |
+
#: libs/blockcountry-settings.php:770
|
386 |
msgid "Choose a page..."
|
387 |
msgstr "Kies een pagina..."
|
388 |
|
389 |
+
#: libs/blockcountry-settings.php:785
|
390 |
msgid "Send headers when user is blocked:"
|
391 |
msgstr "Stuur headers wanneer een gebruiker is geblokkeerd:"
|
392 |
|
393 |
+
#: libs/blockcountry-settings.php:786
|
394 |
msgid ""
|
395 |
"Under normal circumstances you should keep this selected! Only if you have "
|
396 |
"\"Cannot modify header information - headers already sent\" errors or if you "
|
400 |
"deze alleen indien je \"Cannot modify header information - headers already "
|
401 |
"sent\" foutmeldingen krijgt of indien je weet wat je doet."
|
402 |
|
403 |
+
#: libs/blockcountry-settings.php:792
|
404 |
msgid "Number of rows on statistics page:"
|
405 |
msgstr "Aantal regels op de statistieken pagina:"
|
406 |
|
407 |
+
#: libs/blockcountry-settings.php:793
|
408 |
msgid "How many rows do you want to display on each tab the statistics page."
|
409 |
msgstr "Hoeveel regels wil je tonen op de statistieken pagina."
|
410 |
|
411 |
+
#: libs/blockcountry-settings.php:808
|
412 |
msgid "Allow tracking:"
|
413 |
msgstr "Sta traceren toe:"
|
414 |
|
415 |
+
#: libs/blockcountry-settings.php:809
|
416 |
msgid ""
|
417 |
"This sends only the IP address and the number of attempts this ip address "
|
418 |
"tried to login to your backend and was blocked doing so to a central server. "
|
425 |
"ons om beter inzicht te krijgen in de landen waarvandaan een hoop hack "
|
426 |
"pogingen worden gedaan. "
|
427 |
|
428 |
+
#: libs/blockcountry-settings.php:815
|
429 |
msgid "API Key:"
|
430 |
msgstr "API Key:"
|
431 |
|
432 |
+
#: libs/blockcountry-settings.php:821
|
433 |
+
msgid "Log all visits to the backend:"
|
434 |
+
msgstr "Log alle bezoekers op de achterkant:"
|
435 |
+
|
436 |
+
#: libs/blockcountry-settings.php:822
|
437 |
+
msgid ""
|
438 |
+
"This logs all visits to the backend despite if they are blocked or not. This "
|
439 |
+
"is mainly for debugging purposes."
|
440 |
+
msgstr ""
|
441 |
+
"Dit logt alle bezoeken aan de achterkant ongeacht of de bezoeker werd "
|
442 |
+
"geblokkeerd of niet. Dit is voornamelijk bedoeld voor fout opsporing."
|
443 |
+
|
444 |
+
#: libs/blockcountry-settings.php:828
|
445 |
+
msgid "Auto update GeoIP Database:"
|
446 |
+
msgstr "Automatisch updaten GeoIP Database:"
|
447 |
+
|
448 |
+
#: libs/blockcountry-settings.php:829
|
449 |
+
msgid ""
|
450 |
+
"Selecting this makes sure that the GeoIP database is downloaded once a month."
|
451 |
+
msgstr ""
|
452 |
+
"Deze optie selecteren zorgt er voor dat de GeoIP Database automatisch "
|
453 |
+
"maandelijks wordt bijgewerkt."
|
454 |
+
|
455 |
+
#: libs/blockcountry-settings.php:857
|
456 |
msgid "Last blocked visits"
|
457 |
msgstr "Laatste geblokkeerde bezoekers"
|
458 |
|
459 |
+
#: libs/blockcountry-settings.php:867
|
460 |
msgid "Date / Time"
|
461 |
msgstr "Datum / Tijd"
|
462 |
|
463 |
+
#: libs/blockcountry-settings.php:867 libs/blockcountry-settings.php:899
|
464 |
msgid "IP Address"
|
465 |
msgstr "IP adres"
|
466 |
|
467 |
+
#: libs/blockcountry-settings.php:867 libs/blockcountry-settings.php:899
|
468 |
msgid "Hostname"
|
469 |
msgstr "Hostnaam"
|
470 |
|
471 |
+
#: libs/blockcountry-settings.php:867 libs/blockcountry-settings.php:886
|
472 |
msgid "Country"
|
473 |
msgstr "Land"
|
474 |
|
475 |
+
#: libs/blockcountry-settings.php:867
|
476 |
msgid "Frontend/Backend"
|
477 |
msgstr "Voorkant/Achterkant"
|
478 |
|
479 |
+
#: libs/blockcountry-settings.php:877 libs/blockcountry-settings.php:938
|
480 |
msgid "Frontend"
|
481 |
msgstr "Voorkant"
|
482 |
|
483 |
+
#: libs/blockcountry-settings.php:877
|
484 |
msgid "Backend banlist"
|
485 |
msgstr "Achterkant banlist"
|
486 |
|
487 |
+
#: libs/blockcountry-settings.php:877
|
488 |
msgid "Backend & Backend banlist"
|
489 |
msgstr "Achterkant & Achterkant banlist"
|
490 |
|
491 |
+
#: libs/blockcountry-settings.php:877 libs/blockcountry-settings.php:939
|
492 |
msgid "Backend"
|
493 |
msgstr "Achterkant"
|
494 |
|
495 |
+
#: libs/blockcountry-settings.php:884
|
496 |
msgid "Top countries that are blocked"
|
497 |
msgstr "Top landen welke zijn geblokkeerd"
|
498 |
|
499 |
+
#: libs/blockcountry-settings.php:886 libs/blockcountry-settings.php:899
|
500 |
+
#: libs/blockcountry-settings.php:910
|
501 |
msgid "# of blocked attempts"
|
502 |
msgstr "# of geblokkeerde pogingen"
|
503 |
|
504 |
+
#: libs/blockcountry-settings.php:897
|
505 |
msgid "Top hosts that are blocked"
|
506 |
msgstr "Top hosts welke geblokkeerd zijn"
|
507 |
|
508 |
+
#: libs/blockcountry-settings.php:908
|
509 |
msgid "Top URLs that are blocked"
|
510 |
msgstr "Top URLs welke geblokkeerd zijn"
|
511 |
|
512 |
+
#: libs/blockcountry-settings.php:937
|
513 |
msgid "Home"
|
514 |
msgstr "Home"
|
515 |
|
516 |
+
#: libs/blockcountry-settings.php:940
|
517 |
msgid "Pages"
|
518 |
msgstr "Pagina's"
|
519 |
|
520 |
+
#: libs/blockcountry-settings.php:941
|
521 |
msgid "Categories"
|
522 |
msgstr "Categorieen"
|
523 |
|
524 |
+
#: libs/blockcountry-settings.php:942
|
525 |
msgid "Search Engines"
|
526 |
msgstr "Zoek machines"
|
527 |
|
528 |
+
#: libs/blockcountry-settings.php:943
|
529 |
msgid "Tools"
|
530 |
msgstr "Gereedschap"
|
531 |
|
532 |
+
#: libs/blockcountry-settings.php:944
|
533 |
msgid "Logging"
|
534 |
msgstr "Statistieken"
|
535 |
|
536 |
+
#: libs/blockcountry-settings.php:945
|
537 |
msgid "Import/Export"
|
538 |
msgstr "Importeren/Exporteren"
|
539 |
|
540 |
+
#: libs/blockcountry-settings.php:999
|
541 |
msgid "GeoIP database does not exists. Trying to download it..."
|
542 |
msgstr "GeoIP database bestaat niet. Probeer om nieuwe versie te downloaden"
|
543 |
|
544 |
+
#: libs/blockcountry-retrieve-geodb.php:38
|
545 |
+
#: libs/blockcountry-retrieve-geodb.php:49
|
546 |
msgid "Error occured: Could not download the GeoIP database from"
|
547 |
msgstr "Uh oh: Kon de GeoIP database niet downloaden van"
|
548 |
|
549 |
+
#: libs/blockcountry-retrieve-geodb.php:39
|
550 |
msgid ""
|
551 |
"MaxMind has blocked requests from your IP address for 24 hours. Please check "
|
552 |
"again in 24 hours or download this file from your own PC"
|
554 |
"MaxMind heeft alle verzoeken vanaf dit IP adres voor 24 uur geblokkeerd. "
|
555 |
"Controleer nogmaals na 24 uur of download dit bestand via je eigen pc"
|
556 |
|
557 |
+
#: libs/blockcountry-retrieve-geodb.php:40
|
558 |
msgid "Unzip this file and upload it (via FTP for instance) to:"
|
559 |
msgstr "Pak dit bestand uit en upload deze (via FTP bijvoorbeeld) naar:"
|
560 |
|
561 |
+
#: libs/blockcountry-retrieve-geodb.php:50
|
562 |
msgid ""
|
563 |
"Please download this file from your own PC unzip this file and upload it "
|
564 |
"(via FTP for instance) to:"
|
566 |
"Download dit bestand alsjeblieft naar je eigen PC. Pak het bestand daar uit "
|
567 |
"en upload deze (bijvoorbeeld via FTP) naar:"
|
568 |
|
569 |
+
#: libs/blockcountry-retrieve-geodb.php:77
|
570 |
msgid "Finished downloading"
|
571 |
msgstr "Klaar met downloaden"
|
572 |
|
573 |
+
#: libs/blockcountry-retrieve-geodb.php:85
|
574 |
msgid "Fatal error: GeoIP"
|
575 |
msgstr "Fatale fout: GeoIP"
|
576 |
|
577 |
+
#: libs/blockcountry-retrieve-geodb.php:85
|
578 |
msgid ""
|
579 |
"database does not exists. This plugin will not work until the database file "
|
580 |
"is present."
|
libs/blockcountry-checks.php
CHANGED
@@ -39,6 +39,48 @@ function iqblockcountry_check_ipaddress($ip_address)
|
|
39 |
return $country;
|
40 |
}
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
/*
|
43 |
* Check country against bad countries, whitelist and blacklist
|
44 |
*/
|
@@ -185,7 +227,9 @@ function iqblockcountry_CheckCountry() {
|
|
185 |
|
186 |
$ip_address = iqblockcountry_get_ipaddress();
|
187 |
$country = iqblockcountry_check_ipaddress($ip_address);
|
188 |
-
|
|
|
|
|
189 |
if ((iqblockcountry_is_login_page() || is_admin()) && get_option('blockcountry_blockbackend'))
|
190 |
{
|
191 |
$badcountries = get_option( 'blockcountry_backendbanlist' );
|
@@ -251,10 +295,8 @@ function iqblockcountry_CheckCountry() {
|
|
251 |
}
|
252 |
|
253 |
exit ();
|
254 |
-
}
|
255 |
-
|
256 |
}
|
257 |
-
|
258 |
}
|
259 |
|
260 |
|
@@ -262,7 +304,12 @@ function iqblockcountry_CheckCountry() {
|
|
262 |
* Check if page is the login page
|
263 |
*/
|
264 |
function iqblockcountry_is_login_page() {
|
265 |
-
return !strncmp($_SERVER['REQUEST_URI'], '/wp-login.php', strlen('/wp-login.php'));
|
|
|
|
|
|
|
|
|
|
|
266 |
}
|
267 |
|
268 |
/*
|
@@ -270,15 +317,21 @@ function iqblockcountry_is_login_page() {
|
|
270 |
*/
|
271 |
function iqblockcountry_checkupdatedb()
|
272 |
{
|
273 |
-
|
274 |
-
if (empty($lastupdate)) { $lastupdate = 0; }
|
275 |
-
$time = $lastupdate + 86400 * 31;
|
276 |
-
|
277 |
-
if(time() > $time)
|
278 |
{
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
}
|
284 |
}
|
39 |
return $country;
|
40 |
}
|
41 |
|
42 |
+
|
43 |
+
function iqblockcountry_check_city_ipaddress($ip_address)
|
44 |
+
{
|
45 |
+
if (!class_exists('GeoIP'))
|
46 |
+
{
|
47 |
+
include_once("geoip.inc");
|
48 |
+
}
|
49 |
+
include_once("geoipcity.inc");
|
50 |
+
include_once("geoipregionvars.php");
|
51 |
+
|
52 |
+
if ((file_exists ( IPV4DBFILE )) && function_exists('geoip_open')) {
|
53 |
+
|
54 |
+
$ipv4 = FALSE;
|
55 |
+
$ipv6 = FALSE;
|
56 |
+
if (iqblockcountry_is_valid_ipv4($ip_address)) { $ipv4 = TRUE; }
|
57 |
+
if (iqblockcountry_is_valid_ipv6($ip_address)) { $ipv6 = TRUE; }
|
58 |
+
|
59 |
+
if ($ipv4)
|
60 |
+
{
|
61 |
+
$gi = geoip_open ( CITY4DBFILE, GEOIP_STANDARD );
|
62 |
+
$record = geoip_record_by_addr ( $gi, $ip_address );
|
63 |
+
geoip_close ( $gi );
|
64 |
+
}
|
65 |
+
elseif ($ipv6)
|
66 |
+
{
|
67 |
+
if (file_exists ( CITY6DBFILE )) {
|
68 |
+
$gi = geoip_open(CITY6DBFILE,GEOIP_STANDARD);
|
69 |
+
$record = GeoIP_record_by_addr_v6 ( $gi, $ip_address );
|
70 |
+
geoip_close($gi);
|
71 |
+
}
|
72 |
+
else
|
73 |
+
{ $record = "Unknown";
|
74 |
+
}
|
75 |
+
}
|
76 |
+
else { $record = "Unknown"; }
|
77 |
+
}
|
78 |
+
else { $record = "Unknown"; }
|
79 |
+
|
80 |
+
return $record;
|
81 |
+
}
|
82 |
+
|
83 |
+
|
84 |
/*
|
85 |
* Check country against bad countries, whitelist and blacklist
|
86 |
*/
|
227 |
|
228 |
$ip_address = iqblockcountry_get_ipaddress();
|
229 |
$country = iqblockcountry_check_ipaddress($ip_address);
|
230 |
+
// $city = iqblockcountry_check_city_ipaddress($ip_address);
|
231 |
+
// print_r($city);
|
232 |
+
|
233 |
if ((iqblockcountry_is_login_page() || is_admin()) && get_option('blockcountry_blockbackend'))
|
234 |
{
|
235 |
$badcountries = get_option( 'blockcountry_backendbanlist' );
|
295 |
}
|
296 |
|
297 |
exit ();
|
298 |
+
}
|
|
|
299 |
}
|
|
|
300 |
}
|
301 |
|
302 |
|
304 |
* Check if page is the login page
|
305 |
*/
|
306 |
function iqblockcountry_is_login_page() {
|
307 |
+
// return !strncmp($_SERVER['REQUEST_URI'], '/wp-login.php', strlen('/wp-login.php'));
|
308 |
+
$found = FALSE;
|
309 |
+
$pos = strpos( $_SERVER['REQUEST_URI'], 'wp-login' );
|
310 |
+
if ($pos !== false)
|
311 |
+
{ return TRUE; }
|
312 |
+
else { return FALSE; }
|
313 |
}
|
314 |
|
315 |
/*
|
317 |
*/
|
318 |
function iqblockcountry_checkupdatedb()
|
319 |
{
|
320 |
+
if (get_option('blockcountry_automaticupdate') == 'on')
|
|
|
|
|
|
|
|
|
321 |
{
|
322 |
+
$lastupdate = get_option('blockcountry_lastupdate');
|
323 |
+
if (empty($lastupdate)) { $lastupdate = 0; }
|
324 |
+
$time = $lastupdate + 86400 * 31;
|
325 |
+
|
326 |
+
if(time() > $time)
|
327 |
+
{
|
328 |
+
iqblockcountry_downloadgeodatabase("4", false);
|
329 |
+
iqblockcountry_downloadgeodatabase("6", false);
|
330 |
+
update_option('blockcountry_lastupdate' , time());
|
331 |
+
}
|
332 |
+
|
333 |
+
if (! (file_exists ( IPV4DBFILE ))) { iqblockcountry_downloadgeodatabase("4", false); }
|
334 |
+
if (! (file_exists ( IPV6DBFILE ))) { iqblockcountry_downloadgeodatabase("6", false); }
|
335 |
+
|
336 |
}
|
337 |
}
|
libs/blockcountry-logging.php
CHANGED
@@ -49,6 +49,66 @@ function iqblockcountry_update_db_check() {
|
|
49 |
}
|
50 |
}
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
function iqblockcountry_logging($ipaddress,$country,$banend)
|
53 |
{
|
54 |
global $wpdb;
|
@@ -57,4 +117,14 @@ function iqblockcountry_logging($ipaddress,$country,$banend)
|
|
57 |
|
58 |
$table_name = $wpdb->prefix . "iqblock_logging";
|
59 |
$wpdb->insert($table_name,array ('datetime' => current_time('mysql'), 'ipaddress' => $ipaddress, 'country' => $country, 'banned' => $banend,'url' => $urlRequested));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
}
|
49 |
}
|
50 |
}
|
51 |
|
52 |
+
function iqblockcountry_install_loggingdb() {
|
53 |
+
global $wpdb;
|
54 |
+
|
55 |
+
$table_name = $wpdb->prefix . "iqblock_logging_backend";
|
56 |
+
|
57 |
+
$sql = "CREATE TABLE $table_name (
|
58 |
+
id bigint(20) NOT NULL AUTO_INCREMENT,
|
59 |
+
datetime datetime NOT NULL,
|
60 |
+
ipaddress tinytext NOT NULL,
|
61 |
+
country tinytext NOT NULL,
|
62 |
+
url varchar(250) DEFAULT '/' NOT NULL,
|
63 |
+
banned enum('NH','WL') NOT NULL,
|
64 |
+
UNIQUE KEY id (id)
|
65 |
+
);";
|
66 |
+
|
67 |
+
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
|
68 |
+
dbDelta( $sql );
|
69 |
+
}
|
70 |
+
|
71 |
+
function iqblockcountry_uninstall_loggingdb() {
|
72 |
+
global $wpdb;
|
73 |
+
|
74 |
+
$table_name = $wpdb->prefix . "iqblock_logging_backend";
|
75 |
+
|
76 |
+
$sql = "DROP TABLE IF EXISTS `$table_name`;";
|
77 |
+
|
78 |
+
$wpdb->query($sql);
|
79 |
+
|
80 |
+
delete_option( "blockcountry_dbversion2");
|
81 |
+
}
|
82 |
+
|
83 |
+
function iqblockcountry_clean_loggingdb()
|
84 |
+
{
|
85 |
+
global $wpdb;
|
86 |
+
|
87 |
+
$table_name = $wpdb->prefix . "iqblock_logging_db";
|
88 |
+
$sql = "DELETE FROM " . $table_name . " WHERE DATE_SUB(CURDATE(),INTERVAL 14 DAY) >= datetime;";
|
89 |
+
$wpdb->query($sql);
|
90 |
+
|
91 |
+
}
|
92 |
+
|
93 |
+
/*
|
94 |
+
* Schedule tracking if this option was set in the admin panel
|
95 |
+
*/
|
96 |
+
function iqblockcountry_blockcountry_backendlogging($old_value, $new_value)
|
97 |
+
{
|
98 |
+
if ($old_value !== $new_value)
|
99 |
+
{
|
100 |
+
if ($new_value == '')
|
101 |
+
{
|
102 |
+
iqblockcountry_uninstall_loggingdb();
|
103 |
+
}
|
104 |
+
elseif (!empty($new_value))
|
105 |
+
{
|
106 |
+
iqblockcountry_install_loggingdb();
|
107 |
+
}
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
|
112 |
function iqblockcountry_logging($ipaddress,$country,$banend)
|
113 |
{
|
114 |
global $wpdb;
|
117 |
|
118 |
$table_name = $wpdb->prefix . "iqblock_logging";
|
119 |
$wpdb->insert($table_name,array ('datetime' => current_time('mysql'), 'ipaddress' => $ipaddress, 'country' => $country, 'banned' => $banend,'url' => $urlRequested));
|
120 |
+
}
|
121 |
+
|
122 |
+
function iqblockcountry_logging_backend($ipaddress,$country,$banend)
|
123 |
+
{
|
124 |
+
global $wpdb;
|
125 |
+
|
126 |
+
$urlRequested = (isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : '/' );
|
127 |
+
|
128 |
+
$table_name = $wpdb->prefix . "iqblock_logging_backend";
|
129 |
+
$wpdb->insert($table_name,array ('datetime' => current_time('mysql'), 'ipaddress' => $ipaddress, 'country' => $country, 'banned' => $banend,'url' => $urlRequested));
|
130 |
}
|
libs/blockcountry-retrieve-geodb.php
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/*
|
4 |
+
* Download the GeoIP database from MaxMind
|
5 |
+
*/
|
6 |
+
function iqblockcountry_downloadgeodatabase($version, $displayerrors)
|
7 |
+
{
|
8 |
+
if ($version == 4)
|
9 |
+
{
|
10 |
+
iqblockcountry_download_geodb(IPV4DB, IPV4DBFILE, $displayerrors);
|
11 |
+
}
|
12 |
+
elseif ($version == 6)
|
13 |
+
{
|
14 |
+
iqblockcountry_download_geodb(IPV6DB, IPV6DBFILE, $displayerrors);
|
15 |
+
}
|
16 |
+
}
|
17 |
+
|
18 |
+
/*
|
19 |
+
* Download a Geo DB file
|
20 |
+
*/
|
21 |
+
|
22 |
+
function iqblockcountry_download_geodb($url,$geofile,$displayerror)
|
23 |
+
{
|
24 |
+
if( !class_exists( 'WP_Http' ) )
|
25 |
+
include_once( ABSPATH . WPINC. '/class-http.php' );
|
26 |
+
|
27 |
+
$args = array(
|
28 |
+
'timeout' => 15);
|
29 |
+
$request = new WP_Http ();
|
30 |
+
$result = $request->request ( $url ,$args);
|
31 |
+
$content = array ();
|
32 |
+
|
33 |
+
if (is_array($result) && array_key_exists('response',$result) && (in_array ( '403', $result ['response'] )) && (preg_match('/Rate limited exceeded, please try again in 24 hours./', $result['body'] )) )
|
34 |
+
{
|
35 |
+
if($displayerror)
|
36 |
+
{
|
37 |
+
?>
|
38 |
+
<p><?php _e('Error occured: Could not download the GeoIP database from'); ?> <?php echo " " . $url;?><br />
|
39 |
+
<?php _e('MaxMind has blocked requests from your IP address for 24 hours. Please check again in 24 hours or download this file from your own PC'); ?><br />
|
40 |
+
<?php _e('Unzip this file and upload it (via FTP for instance) to:'); ?><strong> <?php echo $geofile;?></strong></p>
|
41 |
+
<?php
|
42 |
+
}
|
43 |
+
}
|
44 |
+
elseif ((isset ( $result->errors )) || (! (in_array ( '200', $result ['response'] ))))
|
45 |
+
{
|
46 |
+
if($displayerror){
|
47 |
+
print_r($result);
|
48 |
+
?>
|
49 |
+
<p><?php _e('Error occured: Could not download the GeoIP database from'); ?> <?php echo " " . $url;?><br />
|
50 |
+
<?php _e('Please download this file from your own PC unzip this file and upload it (via FTP for instance) to:'); ?><strong> <?php echo $geofile;?></strong></p>
|
51 |
+
<?php
|
52 |
+
}
|
53 |
+
}
|
54 |
+
else
|
55 |
+
{
|
56 |
+
/* Download file */
|
57 |
+
if (file_exists ( $geofile . ".gz" )) { unlink ( $geofile . ".gz" ); }
|
58 |
+
$content = $result ['body'];
|
59 |
+
$fp = fopen ( $geofile . ".gz", "w" );
|
60 |
+
fwrite ( $fp, "$content" );
|
61 |
+
fclose ( $fp );
|
62 |
+
|
63 |
+
/* Unzip this file and throw it away afterwards*/
|
64 |
+
$zd = gzopen ( $geofile . ".gz", "r" );
|
65 |
+
$buffer = gzread ( $zd, 2000000 );
|
66 |
+
gzclose ( $zd );
|
67 |
+
if (file_exists ( $geofile . ".gz" )) { unlink ( $geofile . ".gz" ); }
|
68 |
+
|
69 |
+
/* Write this file to the GeoIP database file */
|
70 |
+
if (file_exists ( $geofile )) { unlink ( $geofile ); }
|
71 |
+
$fp = fopen ( $geofile, "w" );
|
72 |
+
fwrite ( $fp, "$buffer" );
|
73 |
+
fclose ( $fp );
|
74 |
+
// update_option('blockcountry_lastupdate' , time());
|
75 |
+
if($displayerror)
|
76 |
+
{
|
77 |
+
print "<p>" . _e('Finished downloading', 'iqblockcountry') . "</p>";
|
78 |
+
}
|
79 |
+
}
|
80 |
+
if (! (file_exists ( IPV4DBFILE )))
|
81 |
+
{
|
82 |
+
if($displayerror)
|
83 |
+
{
|
84 |
+
?>
|
85 |
+
<p><?php echo __('Fatal error: GeoIP') . " " . IPV4DBFILE . " " . __('database does not exists. This plugin will not work until the database file is present.'); ?></p>
|
86 |
+
<?php
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
}
|
91 |
+
|
92 |
+
?>
|
libs/blockcountry-search-engines.php
CHANGED
@@ -5,7 +5,9 @@ $searchengines = array(
|
|
5 |
"Ask" => "ask jeeves",
|
6 |
"Bing" => "bingbot",
|
7 |
"Duck Duck Go" => "duckduckbot",
|
8 |
-
"
|
|
|
|
|
9 |
"Yahoo!" => "yahoo! slurp",
|
10 |
"Yandex" => "yandexbot"
|
11 |
);
|
5 |
"Ask" => "ask jeeves",
|
6 |
"Bing" => "bingbot",
|
7 |
"Duck Duck Go" => "duckduckbot",
|
8 |
+
"Facebook" => "facebookexternalhit",
|
9 |
+
"Google" => "googlebot",
|
10 |
+
"MSN" => "msnbot",
|
11 |
"Yahoo!" => "yahoo! slurp",
|
12 |
"Yandex" => "yandexbot"
|
13 |
);
|
libs/blockcountry-settings.php
CHANGED
@@ -24,6 +24,8 @@ function iqblockcountry_register_mysettings()
|
|
24 |
register_setting ( 'iqblockcountry-settings-group', 'blockcountry_nrstatistics');
|
25 |
register_setting ( 'iqblockcountry-settings-group', 'blockcountry_nrstatistics');
|
26 |
register_setting ( 'iqblockcountry-settings-group', 'blockcountry_apikey');
|
|
|
|
|
27 |
register_setting ( 'iqblockcountry-settings-group-backend', 'blockcountry_blockbackend' );
|
28 |
register_setting ( 'iqblockcountry-settings-group-backend', 'blockcountry_backendbanlist' );
|
29 |
register_setting ( 'iqblockcountry-settings-group-backend', 'blockcountry_backendblacklist','iqblockcountry_validate_ip');
|
@@ -50,7 +52,8 @@ function iqblockcountry_get_options_arr() {
|
|
50 |
$optarr = array( 'blockcountry_banlist', 'blockcountry_backendbanlist','blockcountry_backendblacklist','blockcountry_backendwhitelist',
|
51 |
'blockcountry_frontendblacklist','blockcountry_frontendwhitelist','blockcountry_blockmessage','blockcountry_blocklogin','blockcountry_blockfrontend',
|
52 |
'blockcountry_blockbackend','blockcountry_header','blockcountry_blockpages','blockcountry_pages','blockcountry_blockcategories','blockcountry_categories',
|
53 |
-
'blockcountry_tracking','blockcountry_blockhome','blockcountry_nrstatistics','blockcountry_apikey','blockcountry_redirect','blockcountry_allowse'
|
|
|
54 |
return apply_filters( 'iqblockcountry_options', $optarr );
|
55 |
}
|
56 |
|
@@ -67,6 +70,7 @@ function iqblockcountry_set_defaults()
|
|
67 |
if (get_option('blockcountry_frontendnrblocks') === FALSE) { update_option('blockcountry_frontendnrblocks', 0); }
|
68 |
if (get_option('blockcountry_header') === FALSE) { update_option('blockcountry_header', 'on'); }
|
69 |
if (get_option('blockcountry_nrstatistics') === FALSE) { update_option('blockcountry_nrstatistics',15); }
|
|
|
70 |
$countrylist = iqblockcountry_get_countries();
|
71 |
$ip_address = iqblockcountry_get_ipaddress();
|
72 |
$usercountry = iqblockcountry_check_ipaddress($ip_address);
|
@@ -87,6 +91,7 @@ function iqblockcountry_set_defaults()
|
|
87 |
function iqblockcountry_uninstall() //deletes all the database entries that the plugin has created
|
88 |
{
|
89 |
iqblockcountry_uninstall_db();
|
|
|
90 |
delete_option('blockcountry_banlist' );
|
91 |
delete_option('blockcountry_backendbanlist' );
|
92 |
delete_option('blockcountry_backendblacklist' );
|
@@ -114,6 +119,8 @@ function iqblockcountry_uninstall() //deletes all the database entries that the
|
|
114 |
delete_option('blockcountry_apikey');
|
115 |
delete_option('blockcountry_redirect');
|
116 |
delete_option('blockcountry_allowse');
|
|
|
|
|
117 |
}
|
118 |
|
119 |
|
@@ -170,8 +177,15 @@ function iqblockcountry_settings_tools() {
|
|
170 |
$time = get_option('blockcountry_lastupdate');
|
171 |
|
172 |
$lastupdated = date($dateformat,$time);
|
173 |
-
|
174 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
_e('If you need a manual update please press buttons below to update.', 'iqblockcountry');
|
176 |
?>
|
177 |
|
@@ -802,7 +816,24 @@ function iqblockcountry_settings_home()
|
|
802 |
<td width="70%">
|
803 |
<input type="text" size="25" name="blockcountry_apikey" value="<?php echo get_option ( 'blockcountry_apikey' );?>">
|
804 |
</td></tr>
|
805 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
806 |
<tr><td></td><td>
|
807 |
<p class="submit"><input type="submit" class="button-primary"
|
808 |
value="<?php _e ( 'Save Changes' )?>" /></p>
|
24 |
register_setting ( 'iqblockcountry-settings-group', 'blockcountry_nrstatistics');
|
25 |
register_setting ( 'iqblockcountry-settings-group', 'blockcountry_nrstatistics');
|
26 |
register_setting ( 'iqblockcountry-settings-group', 'blockcountry_apikey');
|
27 |
+
register_setting ( 'iqblockcountry-settings-group', 'blockcountry_backendlogging');
|
28 |
+
register_setting ( 'iqblockcountry-settings-group', 'blockcountry_automaticupdate');
|
29 |
register_setting ( 'iqblockcountry-settings-group-backend', 'blockcountry_blockbackend' );
|
30 |
register_setting ( 'iqblockcountry-settings-group-backend', 'blockcountry_backendbanlist' );
|
31 |
register_setting ( 'iqblockcountry-settings-group-backend', 'blockcountry_backendblacklist','iqblockcountry_validate_ip');
|
52 |
$optarr = array( 'blockcountry_banlist', 'blockcountry_backendbanlist','blockcountry_backendblacklist','blockcountry_backendwhitelist',
|
53 |
'blockcountry_frontendblacklist','blockcountry_frontendwhitelist','blockcountry_blockmessage','blockcountry_blocklogin','blockcountry_blockfrontend',
|
54 |
'blockcountry_blockbackend','blockcountry_header','blockcountry_blockpages','blockcountry_pages','blockcountry_blockcategories','blockcountry_categories',
|
55 |
+
'blockcountry_tracking','blockcountry_blockhome','blockcountry_nrstatistics','blockcountry_apikey','blockcountry_redirect','blockcountry_allowse',
|
56 |
+
'blockcountry_backendlogging','blockcountry_automaticupdate');
|
57 |
return apply_filters( 'iqblockcountry_options', $optarr );
|
58 |
}
|
59 |
|
70 |
if (get_option('blockcountry_frontendnrblocks') === FALSE) { update_option('blockcountry_frontendnrblocks', 0); }
|
71 |
if (get_option('blockcountry_header') === FALSE) { update_option('blockcountry_header', 'on'); }
|
72 |
if (get_option('blockcountry_nrstatistics') === FALSE) { update_option('blockcountry_nrstatistics',15); }
|
73 |
+
if (get_option('blockcountry_automaticupdate') === FALSE) { update_option('blockcountry_automaticupdate','on'); }
|
74 |
$countrylist = iqblockcountry_get_countries();
|
75 |
$ip_address = iqblockcountry_get_ipaddress();
|
76 |
$usercountry = iqblockcountry_check_ipaddress($ip_address);
|
91 |
function iqblockcountry_uninstall() //deletes all the database entries that the plugin has created
|
92 |
{
|
93 |
iqblockcountry_uninstall_db();
|
94 |
+
iqblockcountry_uninstall_loggingdb();
|
95 |
delete_option('blockcountry_banlist' );
|
96 |
delete_option('blockcountry_backendbanlist' );
|
97 |
delete_option('blockcountry_backendblacklist' );
|
119 |
delete_option('blockcountry_apikey');
|
120 |
delete_option('blockcountry_redirect');
|
121 |
delete_option('blockcountry_allowse');
|
122 |
+
delete_option('blockcountry_backendlogging');
|
123 |
+
delete_option('blockcountry_automaticupdate');
|
124 |
}
|
125 |
|
126 |
|
177 |
$time = get_option('blockcountry_lastupdate');
|
178 |
|
179 |
$lastupdated = date($dateformat,$time);
|
180 |
+
if (get_option('blockcountry_automaticupdate') == 'on')
|
181 |
+
{
|
182 |
+
echo "<strong>"; _e('Automatic update is not setup. Last update: ', 'iqblockcountry'); echo $lastupdated; echo ".</strong>.<br />";
|
183 |
+
|
184 |
+
}
|
185 |
+
else
|
186 |
+
{
|
187 |
+
echo "<strong>"; _e('The GeoIP database is updated once a month. Last update: ', 'iqblockcountry'); echo $lastupdated; echo ".</strong>.<br />";
|
188 |
+
}
|
189 |
_e('If you need a manual update please press buttons below to update.', 'iqblockcountry');
|
190 |
?>
|
191 |
|
816 |
<td width="70%">
|
817 |
<input type="text" size="25" name="blockcountry_apikey" value="<?php echo get_option ( 'blockcountry_apikey' );?>">
|
818 |
</td></tr>
|
819 |
+
<!--
|
820 |
+
<tr valign="top">
|
821 |
+
<th width="30%"><?php _e('Log all visits to the backend:', 'iqblockcountry'); ?><br />
|
822 |
+
<em><?php _e('This logs all visits to the backend despite if they are blocked or not. This is mainly for debugging purposes.', 'iqblockcountry'); ?></em></th>
|
823 |
+
<td width="70%">
|
824 |
+
<input type="checkbox" name="blockcountry_backendlogging" <?php checked('on', get_option('blockcountry_backendlogging'), true); ?> />
|
825 |
+
</td></tr>
|
826 |
+
-->
|
827 |
+
<tr valign="top">
|
828 |
+
<th width="30%"><?php _e('Auto update GeoIP Database:', 'iqblockcountry'); ?><br />
|
829 |
+
<em><?php _e('Selecting this makes sure that the GeoIP database is downloaded once a month.', 'iqblockcountry'); ?></em></th>
|
830 |
+
<td width="70%">
|
831 |
+
<input type="checkbox" name="blockcountry_automaticupdate" <?php checked('on', get_option('blockcountry_automaticupdate'), true); ?> />
|
832 |
+
</td></tr>
|
833 |
+
|
834 |
+
|
835 |
+
|
836 |
+
|
837 |
<tr><td></td><td>
|
838 |
<p class="submit"><input type="submit" class="button-primary"
|
839 |
value="<?php _e ( 'Save Changes' )?>" /></p>
|
libs/blockcountry-tracking.php
CHANGED
@@ -1,7 +1,70 @@
|
|
1 |
<?php
|
2 |
|
3 |
/*
|
4 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
*/
|
6 |
function iqblockcountry_tracking_retrieve_xml()
|
7 |
{
|
1 |
<?php
|
2 |
|
3 |
/*
|
4 |
+
* Schedule tracking if this option was set in the admin panel
|
5 |
+
*/
|
6 |
+
function iqblockcountry_schedule_tracking($old_value, $new_value)
|
7 |
+
{
|
8 |
+
$current_schedule = wp_next_scheduled( 'blockcountry_tracking' );
|
9 |
+
if ($old_value !== $new_value)
|
10 |
+
{
|
11 |
+
if ($new_value == '')
|
12 |
+
{
|
13 |
+
wp_clear_scheduled_hook( 'blockcountry_tracking' );
|
14 |
+
}
|
15 |
+
elseif ($new_value == 'on' && $current_schedule == FALSE)
|
16 |
+
{
|
17 |
+
wp_schedule_event( time(), 'hourly', 'blockcountry_tracking' );
|
18 |
+
}
|
19 |
+
}
|
20 |
+
}
|
21 |
+
|
22 |
+
|
23 |
+
/*
|
24 |
+
* iQ Block send Tracking
|
25 |
+
*/
|
26 |
+
function iqblockcountry_tracking()
|
27 |
+
{
|
28 |
+
if (get_option("blockcountry_tracking") == "on")
|
29 |
+
{
|
30 |
+
$lasttracked = get_option("blockcountry_lasttrack");
|
31 |
+
global $wpdb;
|
32 |
+
|
33 |
+
$table_name = $wpdb->prefix . "iqblock_logging";
|
34 |
+
|
35 |
+
$content = array();
|
36 |
+
if (!empty($lasttracked))
|
37 |
+
{
|
38 |
+
$query = "SELECT id,ipaddress,count(ipaddress) as countip FROM $table_name WHERE banned=\"B\" and id > $lasttracked GROUP BY ipaddress ORDER BY id";
|
39 |
+
}
|
40 |
+
else
|
41 |
+
{
|
42 |
+
$query = "SELECT id,ipaddress,count(ipaddress) as countip FROM $table_name WHERE banned=\"B\" GROUP BY ipaddress ORDER BY id";
|
43 |
+
}
|
44 |
+
foreach ($wpdb->get_results( $query ) as $row)
|
45 |
+
{
|
46 |
+
$newcontent = array('ipaddress' => $row->ipaddress,'count' => $row->countip);
|
47 |
+
array_push($content,$newcontent);
|
48 |
+
$id = $row->id;
|
49 |
+
}
|
50 |
+
|
51 |
+
if (!empty($content))
|
52 |
+
{
|
53 |
+
$response = wp_remote_post(TRACKINGURL,
|
54 |
+
array(
|
55 |
+
'body' => $content
|
56 |
+
)
|
57 |
+
);
|
58 |
+
|
59 |
+
if (isset($id)) { update_option('blockcountry_lasttrack',$id); }
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
|
66 |
+
/*
|
67 |
+
* iQ Block Retrieve XML file for API blocking
|
68 |
*/
|
69 |
function iqblockcountry_tracking_retrieve_xml()
|
70 |
{
|
libs/geoip.inc
CHANGED
@@ -20,790 +20,856 @@
|
|
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
21 |
*/
|
22 |
|
23 |
-
|
24 |
-
define(
|
25 |
-
|
26 |
-
|
27 |
-
define(
|
28 |
-
|
29 |
-
|
30 |
-
define(
|
31 |
-
|
32 |
-
|
33 |
-
define(
|
34 |
-
|
35 |
-
|
36 |
-
define(
|
37 |
-
|
38 |
-
|
39 |
-
define(
|
40 |
-
|
41 |
-
|
42 |
-
define(
|
43 |
-
|
44 |
-
|
45 |
-
define(
|
46 |
-
|
47 |
-
|
48 |
-
define(
|
49 |
-
|
50 |
-
|
51 |
-
define(
|
52 |
-
|
53 |
-
|
54 |
-
define(
|
55 |
-
|
56 |
-
|
57 |
-
define(
|
58 |
-
|
59 |
-
|
60 |
-
define(
|
61 |
-
|
62 |
-
|
63 |
-
define(
|
64 |
-
|
65 |
-
|
66 |
-
define(
|
67 |
-
|
68 |
-
|
69 |
-
define(
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
{
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
}
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
}
|
472 |
-
}
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
{
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
}
|
483 |
-
}
|
484 |
-
|
485 |
-
if
|
486 |
-
function
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
if (
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
}
|
539 |
-
}
|
540 |
-
|
541 |
-
if
|
542 |
-
function
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
}
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
{
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
}
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
}
|
620 |
-
}
|
621 |
-
|
622 |
-
if
|
623 |
-
function
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
}
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
{
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
if
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
}
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
}
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
if (
|
778 |
-
|
779 |
-
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
21 |
*/
|
22 |
|
23 |
+
if(!defined('GEOIP_COUNTRY_BEGIN')) {
|
24 |
+
define('GEOIP_COUNTRY_BEGIN', 16776960);
|
25 |
+
}
|
26 |
+
if(!defined('GEOIP_STATE_BEGIN_REV0')) {
|
27 |
+
define('GEOIP_STATE_BEGIN_REV0', 16700000);
|
28 |
+
}
|
29 |
+
if(!defined('GEOIP_STATE_BEGIN_REV1')) {
|
30 |
+
define('GEOIP_STATE_BEGIN_REV1', 16000000);
|
31 |
+
}
|
32 |
+
if(!defined('GEOIP_STANDARD')) {
|
33 |
+
define('GEOIP_STANDARD', 0);
|
34 |
+
}
|
35 |
+
if(!defined('GEOIP_MEMORY_CACHE')) {
|
36 |
+
define('GEOIP_MEMORY_CACHE', 1);
|
37 |
+
}
|
38 |
+
if(!defined('GEOIP_SHARED_MEMORY')) {
|
39 |
+
define('GEOIP_SHARED_MEMORY', 2);
|
40 |
+
}
|
41 |
+
if(!defined('STRUCTURE_INFO_MAX_SIZE')) {
|
42 |
+
define('STRUCTURE_INFO_MAX_SIZE', 20);
|
43 |
+
}
|
44 |
+
if(!defined('DATABASE_INFO_MAX_SIZE')) {
|
45 |
+
define('DATABASE_INFO_MAX_SIZE', 100);
|
46 |
+
}
|
47 |
+
if(!defined('GEOIP_COUNTRY_EDITION')) {
|
48 |
+
define('GEOIP_COUNTRY_EDITION', 106);
|
49 |
+
}
|
50 |
+
if(!defined('GEOIP_PROXY_EDITION')) {
|
51 |
+
define('GEOIP_PROXY_EDITION', 8);
|
52 |
+
}
|
53 |
+
if(!defined('GEOIP_ASNUM_EDITION')) {
|
54 |
+
define('GEOIP_ASNUM_EDITION', 9);
|
55 |
+
}
|
56 |
+
if(!defined('GEOIP_NETSPEED_EDITION')) {
|
57 |
+
define('GEOIP_NETSPEED_EDITION', 10);
|
58 |
+
}
|
59 |
+
if(!defined('GEOIP_REGION_EDITION_REV0')) {
|
60 |
+
define('GEOIP_REGION_EDITION_REV0', 112);
|
61 |
+
}
|
62 |
+
if(!defined('GEOIP_REGION_EDITION_REV1')) {
|
63 |
+
define('GEOIP_REGION_EDITION_REV1', 3);
|
64 |
+
}
|
65 |
+
if(!defined('GEOIP_CITY_EDITION_REV0')) {
|
66 |
+
define('GEOIP_CITY_EDITION_REV0', 111);
|
67 |
+
}
|
68 |
+
if(!defined('GEOIP_CITY_EDITION_REV1')) {
|
69 |
+
define('GEOIP_CITY_EDITION_REV1', 2);
|
70 |
+
}
|
71 |
+
if(!defined('GEOIP_ORG_EDITION')) {
|
72 |
+
define('GEOIP_ORG_EDITION', 110);
|
73 |
+
}
|
74 |
+
if(!defined('GEOIP_ISP_EDITION')) {
|
75 |
+
define('GEOIP_ISP_EDITION', 4);
|
76 |
+
}
|
77 |
+
if(!defined('SEGMENT_RECORD_LENGTH')) {
|
78 |
+
define('SEGMENT_RECORD_LENGTH', 3);
|
79 |
+
}
|
80 |
+
if(!defined('STANDARD_RECORD_LENGTH')) {
|
81 |
+
define('STANDARD_RECORD_LENGTH', 3);
|
82 |
+
}
|
83 |
+
if(!defined('ORG_RECORD_LENGTH')) {
|
84 |
+
define('ORG_RECORD_LENGTH', 4);
|
85 |
+
}
|
86 |
+
if(!defined('MAX_RECORD_LENGTH')) {
|
87 |
+
define('MAX_RECORD_LENGTH', 4);
|
88 |
+
}
|
89 |
+
if(!defined('MAX_ORG_RECORD_LENGTH')) {
|
90 |
+
define('MAX_ORG_RECORD_LENGTH', 300);
|
91 |
+
}
|
92 |
+
if(!defined('GEOIP_SHM_KEY')) {
|
93 |
+
define('GEOIP_SHM_KEY', 0x4f415401);
|
94 |
+
}
|
95 |
+
if(!defined('US_OFFSET')) {
|
96 |
+
define('US_OFFSET', 1);
|
97 |
+
}
|
98 |
+
if(!defined('CANADA_OFFSET')) {
|
99 |
+
define('CANADA_OFFSET', 677);
|
100 |
+
}
|
101 |
+
if(!defined('WORLD_OFFSET')) {
|
102 |
+
define('WORLD_OFFSET', 1353);
|
103 |
+
}
|
104 |
+
if(!defined('FIPS_RANGE')) {
|
105 |
+
define('FIPS_RANGE', 360);
|
106 |
+
}
|
107 |
+
if(!defined('GEOIP_UNKNOWN_SPEED')) {
|
108 |
+
define('GEOIP_UNKNOWN_SPEED', 0);
|
109 |
+
}
|
110 |
+
if(!defined('GEOIP_DIALUP_SPEED')) {
|
111 |
+
define('GEOIP_DIALUP_SPEED', 1);
|
112 |
+
}
|
113 |
+
if(!defined('GEOIP_CABLEDSL_SPEED')) {
|
114 |
+
define('GEOIP_CABLEDSL_SPEED', 2);
|
115 |
+
}
|
116 |
+
if(!defined('GEOIP_CORPORATE_SPEED')) {
|
117 |
+
define('GEOIP_CORPORATE_SPEED', 3);
|
118 |
+
}
|
119 |
+
if(!defined('GEOIP_DOMAIN_EDITION')) {
|
120 |
+
define('GEOIP_DOMAIN_EDITION', 11);
|
121 |
+
}
|
122 |
+
if(!defined('GEOIP_COUNTRY_EDITION_V6')) {
|
123 |
+
define('GEOIP_COUNTRY_EDITION_V6', 12);
|
124 |
+
}
|
125 |
+
if(!defined('GEOIP_LOCATIONA_EDITION')) {
|
126 |
+
define('GEOIP_LOCATIONA_EDITION', 13);
|
127 |
+
}
|
128 |
+
if(!defined('GEOIP_ACCURACYRADIUS_EDITION')) {
|
129 |
+
define('GEOIP_ACCURACYRADIUS_EDITION', 14);
|
130 |
+
}
|
131 |
+
if(!defined('GEOIP_CITYCOMBINED_EDITION')) {
|
132 |
+
define('GEOIP_CITYCOMBINED_EDITION', 15);
|
133 |
+
}
|
134 |
+
if(!defined('GEOIP_CITY_EDITION_REV1_V6')) {
|
135 |
+
define('GEOIP_CITY_EDITION_REV1_V6', 30);
|
136 |
+
}
|
137 |
+
if(!defined('GEOIP_CITY_EDITION_REV0_V6')) {
|
138 |
+
define('GEOIP_CITY_EDITION_REV0_V6', 31);
|
139 |
+
}
|
140 |
+
if(!defined('GEOIP_NETSPEED_EDITION_REV1')) {
|
141 |
+
define('GEOIP_NETSPEED_EDITION_REV1', 32);
|
142 |
+
}
|
143 |
+
if(!defined('GEOIP_NETSPEED_EDITION_REV1_V6')) {
|
144 |
+
define('GEOIP_NETSPEED_EDITION_REV1_V6', 33);
|
145 |
+
}
|
146 |
+
if(!defined('GEOIP_USERTYPE_EDITION')) {
|
147 |
+
define('GEOIP_USERTYPE_EDITION', 28);
|
148 |
+
}
|
149 |
+
if(!defined('GEOIP_USERTYPE_EDITION_V6')) {
|
150 |
+
define('GEOIP_USERTYPE_EDITION_V6', 29);
|
151 |
+
}
|
152 |
+
if(!defined('GEOIP_ASNUM_EDITION_V6')) {
|
153 |
+
define('GEOIP_ASNUM_EDITION_V6', 21);
|
154 |
+
}
|
155 |
+
if(!defined('GEOIP_ISP_EDITION_V6')) {
|
156 |
+
define('GEOIP_ISP_EDITION_V6', 22);
|
157 |
+
}
|
158 |
+
if(!defined('GEOIP_ORG_EDITION_V6')) {
|
159 |
+
define('GEOIP_ORG_EDITION_V6', 23);
|
160 |
+
}
|
161 |
+
if(!defined('GEOIP_DOMAIN_EDITION_V6')) {
|
162 |
+
define('GEOIP_DOMAIN_EDITION_V6', 24);
|
163 |
+
}
|
164 |
+
|
165 |
+
if(!defined('CITYCOMBINED_FIXED_RECORD')) {
|
166 |
+
define('CITYCOMBINED_FIXED_RECORD', 7 );
|
167 |
+
}
|
168 |
+
|
169 |
+
// This is a workaround for one of the major issues of
|
170 |
+
// original GeoIP library, which miserably crashes if it's included twice
|
171 |
+
if(!class_exists('GeoIP')) {
|
172 |
+
class GeoIP {
|
173 |
+
var $flags;
|
174 |
+
var $filehandle;
|
175 |
+
var $memory_buffer;
|
176 |
+
var $databaseType;
|
177 |
+
var $databaseSegments;
|
178 |
+
var $record_length;
|
179 |
+
var $shmid;
|
180 |
+
var $GEOIP_COUNTRY_CODE_TO_NUMBER = array(
|
181 |
+
"" => 0, "AP" => 1, "EU" => 2, "AD" => 3, "AE" => 4, "AF" => 5,
|
182 |
+
"AG" => 6, "AI" => 7, "AL" => 8, "AM" => 9, "CW" => 10, "AO" => 11,
|
183 |
+
"AQ" => 12, "AR" => 13, "AS" => 14, "AT" => 15, "AU" => 16, "AW" => 17,
|
184 |
+
"AZ" => 18, "BA" => 19, "BB" => 20, "BD" => 21, "BE" => 22, "BF" => 23,
|
185 |
+
"BG" => 24, "BH" => 25, "BI" => 26, "BJ" => 27, "BM" => 28, "BN" => 29,
|
186 |
+
"BO" => 30, "BR" => 31, "BS" => 32, "BT" => 33, "BV" => 34, "BW" => 35,
|
187 |
+
"BY" => 36, "BZ" => 37, "CA" => 38, "CC" => 39, "CD" => 40, "CF" => 41,
|
188 |
+
"CG" => 42, "CH" => 43, "CI" => 44, "CK" => 45, "CL" => 46, "CM" => 47,
|
189 |
+
"CN" => 48, "CO" => 49, "CR" => 50, "CU" => 51, "CV" => 52, "CX" => 53,
|
190 |
+
"CY" => 54, "CZ" => 55, "DE" => 56, "DJ" => 57, "DK" => 58, "DM" => 59,
|
191 |
+
"DO" => 60, "DZ" => 61, "EC" => 62, "EE" => 63, "EG" => 64, "EH" => 65,
|
192 |
+
"ER" => 66, "ES" => 67, "ET" => 68, "FI" => 69, "FJ" => 70, "FK" => 71,
|
193 |
+
"FM" => 72, "FO" => 73, "FR" => 74, "SX" => 75, "GA" => 76, "GB" => 77,
|
194 |
+
"GD" => 78, "GE" => 79, "GF" => 80, "GH" => 81, "GI" => 82, "GL" => 83,
|
195 |
+
"GM" => 84, "GN" => 85, "GP" => 86, "GQ" => 87, "GR" => 88, "GS" => 89,
|
196 |
+
"GT" => 90, "GU" => 91, "GW" => 92, "GY" => 93, "HK" => 94, "HM" => 95,
|
197 |
+
"HN" => 96, "HR" => 97, "HT" => 98, "HU" => 99, "ID" => 100, "IE" => 101,
|
198 |
+
"IL" => 102, "IN" => 103, "IO" => 104, "IQ" => 105, "IR" => 106, "IS" => 107,
|
199 |
+
"IT" => 108, "JM" => 109, "JO" => 110, "JP" => 111, "KE" => 112, "KG" => 113,
|
200 |
+
"KH" => 114, "KI" => 115, "KM" => 116, "KN" => 117, "KP" => 118, "KR" => 119,
|
201 |
+
"KW" => 120, "KY" => 121, "KZ" => 122, "LA" => 123, "LB" => 124, "LC" => 125,
|
202 |
+
"LI" => 126, "LK" => 127, "LR" => 128, "LS" => 129, "LT" => 130, "LU" => 131,
|
203 |
+
"LV" => 132, "LY" => 133, "MA" => 134, "MC" => 135, "MD" => 136, "MG" => 137,
|
204 |
+
"MH" => 138, "MK" => 139, "ML" => 140, "MM" => 141, "MN" => 142, "MO" => 143,
|
205 |
+
"MP" => 144, "MQ" => 145, "MR" => 146, "MS" => 147, "MT" => 148, "MU" => 149,
|
206 |
+
"MV" => 150, "MW" => 151, "MX" => 152, "MY" => 153, "MZ" => 154, "NA" => 155,
|
207 |
+
"NC" => 156, "NE" => 157, "NF" => 158, "NG" => 159, "NI" => 160, "NL" => 161,
|
208 |
+
"NO" => 162, "NP" => 163, "NR" => 164, "NU" => 165, "NZ" => 166, "OM" => 167,
|
209 |
+
"PA" => 168, "PE" => 169, "PF" => 170, "PG" => 171, "PH" => 172, "PK" => 173,
|
210 |
+
"PL" => 174, "PM" => 175, "PN" => 176, "PR" => 177, "PS" => 178, "PT" => 179,
|
211 |
+
"PW" => 180, "PY" => 181, "QA" => 182, "RE" => 183, "RO" => 184, "RU" => 185,
|
212 |
+
"RW" => 186, "SA" => 187, "SB" => 188, "SC" => 189, "SD" => 190, "SE" => 191,
|
213 |
+
"SG" => 192, "SH" => 193, "SI" => 194, "SJ" => 195, "SK" => 196, "SL" => 197,
|
214 |
+
"SM" => 198, "SN" => 199, "SO" => 200, "SR" => 201, "ST" => 202, "SV" => 203,
|
215 |
+
"SY" => 204, "SZ" => 205, "TC" => 206, "TD" => 207, "TF" => 208, "TG" => 209,
|
216 |
+
"TH" => 210, "TJ" => 211, "TK" => 212, "TM" => 213, "TN" => 214, "TO" => 215,
|
217 |
+
"TL" => 216, "TR" => 217, "TT" => 218, "TV" => 219, "TW" => 220, "TZ" => 221,
|
218 |
+
"UA" => 222, "UG" => 223, "UM" => 224, "US" => 225, "UY" => 226, "UZ" => 227,
|
219 |
+
"VA" => 228, "VC" => 229, "VE" => 230, "VG" => 231, "VI" => 232, "VN" => 233,
|
220 |
+
"VU" => 234, "WF" => 235, "WS" => 236, "YE" => 237, "YT" => 238, "RS" => 239,
|
221 |
+
"ZA" => 240, "ZM" => 241, "ME" => 242, "ZW" => 243, "A1" => 244, "A2" => 245,
|
222 |
+
"O1" => 246, "AX" => 247, "GG" => 248, "IM" => 249, "JE" => 250, "BL" => 251,
|
223 |
+
"MF" => 252, "BQ" => 253, "SS" => 254
|
224 |
+
);
|
225 |
+
var $GEOIP_COUNTRY_CODES = array(
|
226 |
+
"","AP","EU","AD","AE","AF","AG","AI","AL","AM","CW",
|
227 |
+
"AO","AQ","AR","AS","AT","AU","AW","AZ","BA","BB",
|
228 |
+
"BD","BE","BF","BG","BH","BI","BJ","BM","BN","BO",
|
229 |
+
"BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD",
|
230 |
+
"CF","CG","CH","CI","CK","CL","CM","CN","CO","CR",
|
231 |
+
"CU","CV","CX","CY","CZ","DE","DJ","DK","DM","DO",
|
232 |
+
"DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ",
|
233 |
+
"FK","FM","FO","FR","SX","GA","GB","GD","GE","GF",
|
234 |
+
"GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT",
|
235 |
+
"GU","GW","GY","HK","HM","HN","HR","HT","HU","ID",
|
236 |
+
"IE","IL","IN","IO","IQ","IR","IS","IT","JM","JO",
|
237 |
+
"JP","KE","KG","KH","KI","KM","KN","KP","KR","KW",
|
238 |
+
"KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT",
|
239 |
+
"LU","LV","LY","MA","MC","MD","MG","MH","MK","ML",
|
240 |
+
"MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV",
|
241 |
+
"MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI",
|
242 |
+
"NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF",
|
243 |
+
"PG","PH","PK","PL","PM","PN","PR","PS","PT","PW",
|
244 |
+
"PY","QA","RE","RO","RU","RW","SA","SB","SC","SD",
|
245 |
+
"SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO",
|
246 |
+
"SR","ST","SV","SY","SZ","TC","TD","TF","TG","TH",
|
247 |
+
"TJ","TK","TM","TN","TO","TL","TR","TT","TV","TW",
|
248 |
+
"TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE",
|
249 |
+
"VG","VI","VN","VU","WF","WS","YE","YT","RS","ZA",
|
250 |
+
"ZM","ME","ZW","A1","A2","O1","AX","GG","IM","JE",
|
251 |
+
"BL","MF", "BQ", "SS", "O1" );
|
252 |
+
var $GEOIP_COUNTRY_CODES3 = array(
|
253 |
+
"","AP","EU","AND","ARE","AFG","ATG","AIA","ALB","ARM","CUW",
|
254 |
+
"AGO","ATA","ARG","ASM","AUT","AUS","ABW","AZE","BIH","BRB",
|
255 |
+
"BGD","BEL","BFA","BGR","BHR","BDI","BEN","BMU","BRN","BOL",
|
256 |
+
"BRA","BHS","BTN","BVT","BWA","BLR","BLZ","CAN","CCK","COD",
|
257 |
+
"CAF","COG","CHE","CIV","COK","CHL","CMR","CHN","COL","CRI",
|
258 |
+
"CUB","CPV","CXR","CYP","CZE","DEU","DJI","DNK","DMA","DOM",
|
259 |
+
"DZA","ECU","EST","EGY","ESH","ERI","ESP","ETH","FIN","FJI",
|
260 |
+
"FLK","FSM","FRO","FRA","SXM","GAB","GBR","GRD","GEO","GUF",
|
261 |
+
"GHA","GIB","GRL","GMB","GIN","GLP","GNQ","GRC","SGS","GTM",
|
262 |
+
"GUM","GNB","GUY","HKG","HMD","HND","HRV","HTI","HUN","IDN",
|
263 |
+
"IRL","ISR","IND","IOT","IRQ","IRN","ISL","ITA","JAM","JOR",
|
264 |
+
"JPN","KEN","KGZ","KHM","KIR","COM","KNA","PRK","KOR","KWT",
|
265 |
+
"CYM","KAZ","LAO","LBN","LCA","LIE","LKA","LBR","LSO","LTU",
|
266 |
+
"LUX","LVA","LBY","MAR","MCO","MDA","MDG","MHL","MKD","MLI",
|
267 |
+
"MMR","MNG","MAC","MNP","MTQ","MRT","MSR","MLT","MUS","MDV",
|
268 |
+
"MWI","MEX","MYS","MOZ","NAM","NCL","NER","NFK","NGA","NIC",
|
269 |
+
"NLD","NOR","NPL","NRU","NIU","NZL","OMN","PAN","PER","PYF",
|
270 |
+
"PNG","PHL","PAK","POL","SPM","PCN","PRI","PSE","PRT","PLW",
|
271 |
+
"PRY","QAT","REU","ROU","RUS","RWA","SAU","SLB","SYC","SDN",
|
272 |
+
"SWE","SGP","SHN","SVN","SJM","SVK","SLE","SMR","SEN","SOM",
|
273 |
+
"SUR","STP","SLV","SYR","SWZ","TCA","TCD","ATF","TGO","THA",
|
274 |
+
"TJK","TKL","TKM","TUN","TON","TLS","TUR","TTO","TUV","TWN",
|
275 |
+
"TZA","UKR","UGA","UMI","USA","URY","UZB","VAT","VCT","VEN",
|
276 |
+
"VGB","VIR","VNM","VUT","WLF","WSM","YEM","MYT","SRB","ZAF",
|
277 |
+
"ZMB","MNE","ZWE","A1","A2","O1","ALA","GGY","IMN","JEY",
|
278 |
+
"BLM","MAF", "BES", "SSD", "O1"
|
279 |
+
);
|
280 |
+
var $GEOIP_COUNTRY_NAMES = array(
|
281 |
+
"","Asia/Pacific Region","Europe","Andorra","United Arab Emirates","Afghanistan","Antigua and Barbuda","Anguilla","Albania","Armenia","Curacao",
|
282 |
+
"Angola","Antarctica","Argentina","American Samoa","Austria","Australia","Aruba","Azerbaijan","Bosnia and Herzegovina","Barbados",
|
283 |
+
"Bangladesh","Belgium","Burkina Faso","Bulgaria","Bahrain","Burundi","Benin","Bermuda","Brunei Darussalam","Bolivia",
|
284 |
+
"Brazil","Bahamas","Bhutan","Bouvet Island","Botswana","Belarus","Belize","Canada","Cocos (Keeling) Islands","Congo, The Democratic Republic of the",
|
285 |
+
"Central African Republic","Congo","Switzerland","Cote D'Ivoire","Cook Islands","Chile","Cameroon","China","Colombia","Costa Rica",
|
286 |
+
"Cuba","Cape Verde","Christmas Island","Cyprus","Czech Republic","Germany","Djibouti","Denmark","Dominica","Dominican Republic",
|
287 |
+
"Algeria","Ecuador","Estonia","Egypt","Western Sahara","Eritrea","Spain","Ethiopia","Finland","Fiji",
|
288 |
+
"Falkland Islands (Malvinas)","Micronesia, Federated States of","Faroe Islands","France","Sint Maarten (Dutch part)","Gabon","United Kingdom","Grenada","Georgia","French Guiana",
|
289 |
+
"Ghana","Gibraltar","Greenland","Gambia","Guinea","Guadeloupe","Equatorial Guinea","Greece","South Georgia and the South Sandwich Islands","Guatemala",
|
290 |
+
"Guam","Guinea-Bissau","Guyana","Hong Kong","Heard Island and McDonald Islands","Honduras","Croatia","Haiti","Hungary","Indonesia",
|
291 |
+
"Ireland","Israel","India","British Indian Ocean Territory","Iraq","Iran, Islamic Republic of","Iceland","Italy","Jamaica","Jordan",
|
292 |
+
"Japan","Kenya","Kyrgyzstan","Cambodia","Kiribati","Comoros","Saint Kitts and Nevis","Korea, Democratic People's Republic of","Korea, Republic of","Kuwait",
|
293 |
+
"Cayman Islands","Kazakhstan","Lao People's Democratic Republic","Lebanon","Saint Lucia","Liechtenstein","Sri Lanka","Liberia","Lesotho","Lithuania",
|
294 |
+
"Luxembourg","Latvia","Libya","Morocco","Monaco","Moldova, Republic of","Madagascar","Marshall Islands","Macedonia","Mali",
|
295 |
+
"Myanmar","Mongolia","Macau","Northern Mariana Islands","Martinique","Mauritania","Montserrat","Malta","Mauritius","Maldives",
|
296 |
+
"Malawi","Mexico","Malaysia","Mozambique","Namibia","New Caledonia","Niger","Norfolk Island","Nigeria","Nicaragua",
|
297 |
+
"Netherlands","Norway","Nepal","Nauru","Niue","New Zealand","Oman","Panama","Peru","French Polynesia",
|
298 |
+
"Papua New Guinea","Philippines","Pakistan","Poland","Saint Pierre and Miquelon","Pitcairn Islands","Puerto Rico","Palestinian Territory","Portugal","Palau",
|
299 |
+
"Paraguay","Qatar","Reunion","Romania","Russian Federation","Rwanda","Saudi Arabia","Solomon Islands","Seychelles","Sudan",
|
300 |
+
"Sweden","Singapore","Saint Helena","Slovenia","Svalbard and Jan Mayen","Slovakia","Sierra Leone","San Marino","Senegal","Somalia","Suriname",
|
301 |
+
"Sao Tome and Principe","El Salvador","Syrian Arab Republic","Swaziland","Turks and Caicos Islands","Chad","French Southern Territories","Togo","Thailand",
|
302 |
+
"Tajikistan","Tokelau","Turkmenistan","Tunisia","Tonga","Timor-Leste","Turkey","Trinidad and Tobago","Tuvalu","Taiwan",
|
303 |
+
"Tanzania, United Republic of","Ukraine","Uganda","United States Minor Outlying Islands","United States","Uruguay","Uzbekistan","Holy See (Vatican City State)","Saint Vincent and the Grenadines","Venezuela",
|
304 |
+
"Virgin Islands, British","Virgin Islands, U.S.","Vietnam","Vanuatu","Wallis and Futuna","Samoa","Yemen","Mayotte","Serbia","South Africa",
|
305 |
+
"Zambia","Montenegro","Zimbabwe","Anonymous Proxy","Satellite Provider","Other","Aland Islands","Guernsey","Isle of Man","Jersey",
|
306 |
+
"Saint Barthelemy","Saint Martin", "Bonaire, Saint Eustatius and Saba",
|
307 |
+
"South Sudan", "Other"
|
308 |
+
);
|
309 |
+
|
310 |
+
var $GEOIP_CONTINENT_CODES = array(
|
311 |
+
"--", "AS","EU","EU","AS","AS","NA","NA","EU","AS","NA",
|
312 |
+
"AF","AN","SA","OC","EU","OC","NA","AS","EU","NA",
|
313 |
+
"AS","EU","AF","EU","AS","AF","AF","NA","AS","SA",
|
314 |
+
"SA","NA","AS","AN","AF","EU","NA","NA","AS","AF",
|
315 |
+
"AF","AF","EU","AF","OC","SA","AF","AS","SA","NA",
|
316 |
+
"NA","AF","AS","AS","EU","EU","AF","EU","NA","NA",
|
317 |
+
"AF","SA","EU","AF","AF","AF","EU","AF","EU","OC",
|
318 |
+
"SA","OC","EU","EU","NA","AF","EU","NA","AS","SA",
|
319 |
+
"AF","EU","NA","AF","AF","NA","AF","EU","AN","NA",
|
320 |
+
"OC","AF","SA","AS","AN","NA","EU","NA","EU","AS",
|
321 |
+
"EU","AS","AS","AS","AS","AS","EU","EU","NA","AS",
|
322 |
+
"AS","AF","AS","AS","OC","AF","NA","AS","AS","AS",
|
323 |
+
"NA","AS","AS","AS","NA","EU","AS","AF","AF","EU",
|
324 |
+
"EU","EU","AF","AF","EU","EU","AF","OC","EU","AF",
|
325 |
+
"AS","AS","AS","OC","NA","AF","NA","EU","AF","AS",
|
326 |
+
"AF","NA","AS","AF","AF","OC","AF","OC","AF","NA",
|
327 |
+
"EU","EU","AS","OC","OC","OC","AS","NA","SA","OC",
|
328 |
+
"OC","AS","AS","EU","NA","OC","NA","AS","EU","OC",
|
329 |
+
"SA","AS","AF","EU","EU","AF","AS","OC","AF","AF",
|
330 |
+
"EU","AS","AF","EU","EU","EU","AF","EU","AF","AF",
|
331 |
+
"SA","AF","NA","AS","AF","NA","AF","AN","AF","AS",
|
332 |
+
"AS","OC","AS","AF","OC","AS","EU","NA","OC","AS",
|
333 |
+
"AF","EU","AF","OC","NA","SA","AS","EU","NA","SA",
|
334 |
+
"NA","NA","AS","OC","OC","OC","AS","AF","EU","AF",
|
335 |
+
"AF","EU","AF","--","--","--","EU","EU","EU","EU",
|
336 |
+
"NA","NA","NA", "AF", "--"
|
337 |
+
);
|
338 |
+
|
339 |
+
}
|
340 |
+
}
|
341 |
+
|
342 |
+
|
343 |
+
if(!function_exists('geoip_load_shared_mem')) {
|
344 |
+
function geoip_load_shared_mem ($file) {
|
345 |
+
|
346 |
+
$fp = fopen($file, "rb");
|
347 |
+
if (!$fp) {
|
348 |
+
throw new Exception("GeoIP, Shared Memory Loading - Error opening file $file. Error: $php_errormsg. Operation aborted.");
|
349 |
+
}
|
350 |
+
$s_array = fstat($fp);
|
351 |
+
$size = $s_array['size'];
|
352 |
+
if ($shmid = @shmop_open (GEOIP_SHM_KEY, "w", 0, 0)) {
|
353 |
+
shmop_delete ($shmid);
|
354 |
+
shmop_close ($shmid);
|
355 |
+
}
|
356 |
+
$shmid = shmop_open (GEOIP_SHM_KEY, "c", 0644, $size);
|
357 |
+
shmop_write ($shmid, fread($fp, $size), 0);
|
358 |
+
shmop_close ($shmid);
|
359 |
+
}
|
360 |
+
}
|
361 |
+
|
362 |
+
if(!function_exists('_setup_segments')) {
|
363 |
+
function _setup_segments($gi){
|
364 |
+
$gi->databaseType = GEOIP_COUNTRY_EDITION;
|
365 |
+
$gi->record_length = STANDARD_RECORD_LENGTH;
|
366 |
+
if ($gi->flags & GEOIP_SHARED_MEMORY) {
|
367 |
+
$offset = @shmop_size ($gi->shmid) - 3;
|
368 |
+
for ($i = 0; $i < STRUCTURE_INFO_MAX_SIZE; $i++) {
|
369 |
+
$delim = @shmop_read ($gi->shmid, $offset, 3);
|
370 |
+
$offset += 3;
|
371 |
+
if ($delim == (chr(255).chr(255).chr(255))) {
|
372 |
+
$gi->databaseType = ord(@shmop_read ($gi->shmid, $offset, 1));
|
373 |
+
$offset++;
|
374 |
+
|
375 |
+
if ($gi->databaseType == GEOIP_REGION_EDITION_REV0){
|
376 |
+
$gi->databaseSegments = GEOIP_STATE_BEGIN_REV0;
|
377 |
+
} else if ($gi->databaseType == GEOIP_REGION_EDITION_REV1){
|
378 |
+
$gi->databaseSegments = GEOIP_STATE_BEGIN_REV1;
|
379 |
+
} else if (($gi->databaseType == GEOIP_CITY_EDITION_REV0)||
|
380 |
+
($gi->databaseType == GEOIP_CITY_EDITION_REV1)
|
381 |
+
|| ($gi->databaseType == GEOIP_ORG_EDITION)
|
382 |
+
|| ($gi->databaseType == GEOIP_ORG_EDITION_V6)
|
383 |
+
|| ($gi->databaseType == GEOIP_DOMAIN_EDITION)
|
384 |
+
|| ($gi->databaseType == GEOIP_DOMAIN_EDITION_V6)
|
385 |
+
|| ($gi->databaseType == GEOIP_ISP_EDITION)
|
386 |
+
|| ($gi->databaseType == GEOIP_ISP_EDITION_V6)
|
387 |
+
|| ($gi->databaseType == GEOIP_USERTYPE_EDITION)
|
388 |
+
|| ($gi->databaseType == GEOIP_USERTYPE_EDITION_V6)
|
389 |
+
|| ($gi->databaseType == GEOIP_LOCATIONA_EDITION)
|
390 |
+
|| ($gi->databaseType == GEOIP_ACCURACYRADIUS_EDITION)
|
391 |
+
|| ($gi->databaseType == GEOIP_CITY_EDITION_REV0_V6)
|
392 |
+
|| ($gi->databaseType == GEOIP_CITY_EDITION_REV1_V6)
|
393 |
+
|| ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1)
|
394 |
+
|| ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1_V6)
|
395 |
+
|| ($gi->databaseType == GEOIP_ASNUM_EDITION)
|
396 |
+
|| ($gi->databaseType == GEOIP_ASNUM_EDITION_V6)){
|
397 |
+
$gi->databaseSegments = 0;
|
398 |
+
$buf = @shmop_read ($gi->shmid, $offset, SEGMENT_RECORD_LENGTH);
|
399 |
+
for ($j = 0;$j < SEGMENT_RECORD_LENGTH;$j++){
|
400 |
+
$gi->databaseSegments += (ord($buf[$j]) << ($j * 8));
|
401 |
+
}
|
402 |
+
if (($gi->databaseType == GEOIP_ORG_EDITION)
|
403 |
+
|| ($gi->databaseType == GEOIP_ORG_EDITION_V6)
|
404 |
+
|| ($gi->databaseType == GEOIP_DOMAIN_EDITION)
|
405 |
+
|| ($gi->databaseType == GEOIP_DOMAIN_EDITION_V6)
|
406 |
+
|| ($gi->databaseType == GEOIP_ISP_EDITION)
|
407 |
+
|| ($gi->databaseType == GEOIP_ISP_EDITION_V6)) {
|
408 |
+
$gi->record_length = ORG_RECORD_LENGTH;
|
409 |
+
}
|
410 |
+
}
|
411 |
+
break;
|
412 |
+
} else {
|
413 |
+
$offset -= 4;
|
414 |
+
}
|
415 |
+
}
|
416 |
+
if (($gi->databaseType == GEOIP_COUNTRY_EDITION)||
|
417 |
+
($gi->databaseType == GEOIP_COUNTRY_EDITION_V6)||
|
418 |
+
($gi->databaseType == GEOIP_PROXY_EDITION)||
|
419 |
+
($gi->databaseType == GEOIP_NETSPEED_EDITION)){
|
420 |
+
$gi->databaseSegments = GEOIP_COUNTRY_BEGIN;
|
421 |
+
}
|
422 |
+
} else {
|
423 |
+
$filepos = ftell($gi->filehandle);
|
424 |
+
fseek($gi->filehandle, -3, SEEK_END);
|
425 |
+
for ($i = 0; $i < STRUCTURE_INFO_MAX_SIZE; $i++) {
|
426 |
+
$delim = fread($gi->filehandle,3);
|
427 |
+
if ($delim == (chr(255).chr(255).chr(255))){
|
428 |
+
$gi->databaseType = ord(fread($gi->filehandle,1));
|
429 |
+
if ($gi->databaseType == GEOIP_REGION_EDITION_REV0){
|
430 |
+
$gi->databaseSegments = GEOIP_STATE_BEGIN_REV0;
|
431 |
+
}
|
432 |
+
else if ($gi->databaseType == GEOIP_REGION_EDITION_REV1){
|
433 |
+
$gi->databaseSegments = GEOIP_STATE_BEGIN_REV1;
|
434 |
+
} else if (($gi->databaseType == GEOIP_CITY_EDITION_REV0)
|
435 |
+
|| ($gi->databaseType == GEOIP_CITY_EDITION_REV1)
|
436 |
+
|| ($gi->databaseType == GEOIP_CITY_EDITION_REV0_V6)
|
437 |
+
|| ($gi->databaseType == GEOIP_CITY_EDITION_REV1_V6)
|
438 |
+
|| ($gi->databaseType == GEOIP_ORG_EDITION)
|
439 |
+
|| ($gi->databaseType == GEOIP_DOMAIN_EDITION)
|
440 |
+
|| ($gi->databaseType == GEOIP_ISP_EDITION)
|
441 |
+
|| ($gi->databaseType == GEOIP_ORG_EDITION_V6)
|
442 |
+
|| ($gi->databaseType == GEOIP_DOMAIN_EDITION_V6)
|
443 |
+
|| ($gi->databaseType == GEOIP_ISP_EDITION_V6)
|
444 |
+
|| ($gi->databaseType == GEOIP_LOCATIONA_EDITION)
|
445 |
+
|| ($gi->databaseType == GEOIP_ACCURACYRADIUS_EDITION)
|
446 |
+
|| ($gi->databaseType == GEOIP_CITY_EDITION_REV0_V6)
|
447 |
+
|| ($gi->databaseType == GEOIP_CITY_EDITION_REV1_V6)
|
448 |
+
|| ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1)
|
449 |
+
|| ($gi->databaseType == GEOIP_NETSPEED_EDITION_REV1_V6)
|
450 |
+
|| ($gi->databaseType == GEOIP_USERTYPE_EDITION)
|
451 |
+
|| ($gi->databaseType == GEOIP_USERTYPE_EDITION_V6)
|
452 |
+
|| ($gi->databaseType == GEOIP_ASNUM_EDITION)
|
453 |
+
|| ($gi->databaseType == GEOIP_ASNUM_EDITION_V6)){
|
454 |
+
$gi->databaseSegments = 0;
|
455 |
+
$buf = fread($gi->filehandle,SEGMENT_RECORD_LENGTH);
|
456 |
+
for ($j = 0;$j < SEGMENT_RECORD_LENGTH;$j++){
|
457 |
+
$gi->databaseSegments += (ord($buf[$j]) << ($j * 8));
|
458 |
+
}
|
459 |
+
if ( ( $gi->databaseType == GEOIP_ORG_EDITION )
|
460 |
+
|| ( $gi->databaseType == GEOIP_DOMAIN_EDITION )
|
461 |
+
|| ( $gi->databaseType == GEOIP_ISP_EDITION )
|
462 |
+
|| ( $gi->databaseType == GEOIP_ORG_EDITION_V6 )
|
463 |
+
|| ( $gi->databaseType == GEOIP_DOMAIN_EDITION_V6 )
|
464 |
+
|| ( $gi->databaseType == GEOIP_ISP_EDITION_V6 )) {
|
465 |
+
$gi->record_length = ORG_RECORD_LENGTH;
|
466 |
+
}
|
467 |
+
}
|
468 |
+
break;
|
469 |
+
} else {
|
470 |
+
fseek($gi->filehandle, -4, SEEK_CUR);
|
471 |
+
}
|
472 |
+
}
|
473 |
+
if (($gi->databaseType == GEOIP_COUNTRY_EDITION)||
|
474 |
+
($gi->databaseType == GEOIP_COUNTRY_EDITION_V6)||
|
475 |
+
($gi->databaseType == GEOIP_PROXY_EDITION)||
|
476 |
+
($gi->databaseType == GEOIP_NETSPEED_EDITION)){
|
477 |
+
$gi->databaseSegments = GEOIP_COUNTRY_BEGIN;
|
478 |
+
}
|
479 |
+
fseek($gi->filehandle,$filepos,SEEK_SET);
|
480 |
+
}
|
481 |
+
return $gi;
|
482 |
+
}
|
483 |
+
}
|
484 |
+
|
485 |
+
if(!function_exists('geoip_open')) {
|
486 |
+
function geoip_open($filename, $flags) {
|
487 |
+
$gi = new GeoIP;
|
488 |
+
$gi->flags = $flags;
|
489 |
+
if ($gi->flags & GEOIP_SHARED_MEMORY) {
|
490 |
+
$gi->shmid = @shmop_open (GEOIP_SHM_KEY, "a", 0, 0);
|
491 |
+
} else {
|
492 |
+
$gi->filehandle = fopen($filename,"rb");
|
493 |
+
if($gi->filehandle === false) {
|
494 |
+
throw new Exception("GeoIP - Could not open database file $filename." );
|
495 |
+
}
|
496 |
+
if ($gi->flags & GEOIP_MEMORY_CACHE) {
|
497 |
+
$s_array = fstat($gi->filehandle);
|
498 |
+
$gi->memory_buffer = fread($gi->filehandle, $s_array['size']);
|
499 |
+
}
|
500 |
+
}
|
501 |
+
|
502 |
+
$gi = _setup_segments($gi);
|
503 |
+
return $gi;
|
504 |
+
}
|
505 |
+
}
|
506 |
+
|
507 |
+
if(!function_exists('geoip_close')) {
|
508 |
+
function geoip_close($gi) {
|
509 |
+
if ($gi->flags & GEOIP_SHARED_MEMORY) {
|
510 |
+
return true;
|
511 |
+
}
|
512 |
+
|
513 |
+
return fclose($gi->filehandle);
|
514 |
+
}
|
515 |
+
}
|
516 |
+
|
517 |
+
if(!function_exists('geoip_country_id_by_name_v6')) {
|
518 |
+
function geoip_country_id_by_name_v6($gi, $name) {
|
519 |
+
$rec = dns_get_record($name, DNS_AAAA);
|
520 |
+
if ( !$rec ) {
|
521 |
+
return false;
|
522 |
+
}
|
523 |
+
$addr = $rec[0]["ipv6"];
|
524 |
+
if (!$addr || $addr == $name) {
|
525 |
+
return false;
|
526 |
+
}
|
527 |
+
return geoip_country_id_by_addr_v6($gi, $addr);
|
528 |
+
}
|
529 |
+
}
|
530 |
+
|
531 |
+
if(!function_exists('geoip_country_id_by_name')) {
|
532 |
+
function geoip_country_id_by_name($gi, $name) {
|
533 |
+
$addr = gethostbyname($name);
|
534 |
+
if (!$addr || $addr == $name) {
|
535 |
+
return false;
|
536 |
+
}
|
537 |
+
return geoip_country_id_by_addr($gi, $addr);
|
538 |
+
}
|
539 |
+
}
|
540 |
+
|
541 |
+
if(!function_exists('geoip_country_code_by_name_v6')) {
|
542 |
+
function geoip_country_code_by_name_v6($gi, $name) {
|
543 |
+
$country_id = geoip_country_id_by_name_v6($gi,$name);
|
544 |
+
if ($country_id !== false) {
|
545 |
+
return $gi->GEOIP_COUNTRY_CODES[$country_id];
|
546 |
+
}
|
547 |
+
return false;
|
548 |
+
}
|
549 |
+
}
|
550 |
+
|
551 |
+
if(!function_exists('geoip_country_code_by_name')) {
|
552 |
+
function geoip_country_code_by_name($gi, $name) {
|
553 |
+
$country_id = geoip_country_id_by_name($gi,$name);
|
554 |
+
if ($country_id !== false) {
|
555 |
+
return $gi->GEOIP_COUNTRY_CODES[$country_id];
|
556 |
+
}
|
557 |
+
return false;
|
558 |
+
}
|
559 |
+
}
|
560 |
+
|
561 |
+
if(!function_exists('geoip_country_name_by_name_v6')) {
|
562 |
+
function geoip_country_name_by_name_v6($gi, $name) {
|
563 |
+
$country_id = geoip_country_id_by_name_v6($gi,$name);
|
564 |
+
if ($country_id !== false) {
|
565 |
+
return $gi->GEOIP_COUNTRY_NAMES[$country_id];
|
566 |
+
}
|
567 |
+
return false;
|
568 |
+
}
|
569 |
+
}
|
570 |
+
|
571 |
+
if(!function_exists('geoip_country_name_by_name')) {
|
572 |
+
function geoip_country_name_by_name($gi, $name) {
|
573 |
+
$country_id = geoip_country_id_by_name($gi,$name);
|
574 |
+
if ($country_id !== false) {
|
575 |
+
return $gi->GEOIP_COUNTRY_NAMES[$country_id];
|
576 |
+
}
|
577 |
+
return false;
|
578 |
+
}
|
579 |
+
}
|
580 |
+
|
581 |
+
if(!function_exists('geoip_country_id_by_addr_v6')) {
|
582 |
+
function geoip_country_id_by_addr_v6($gi, $addr) {
|
583 |
+
$ipnum = inet_pton($addr);
|
584 |
+
return _geoip_seek_country_v6($gi, $ipnum) - GEOIP_COUNTRY_BEGIN;
|
585 |
+
}
|
586 |
+
}
|
587 |
+
|
588 |
+
if(!function_exists('geoip_country_id_by_addr')) {
|
589 |
+
function geoip_country_id_by_addr($gi, $addr) {
|
590 |
+
$ipnum = ip2long($addr);
|
591 |
+
return _geoip_seek_country($gi, $ipnum) - GEOIP_COUNTRY_BEGIN;
|
592 |
+
}
|
593 |
+
}
|
594 |
+
|
595 |
+
if(!function_exists('geoip_country_code_by_addr_v6')) {
|
596 |
+
function geoip_country_code_by_addr_v6($gi, $addr) {
|
597 |
+
$country_id = geoip_country_id_by_addr_v6($gi,$addr);
|
598 |
+
if ($country_id !== false) {
|
599 |
+
return $gi->GEOIP_COUNTRY_CODES[$country_id];
|
600 |
+
}
|
601 |
+
return false;
|
602 |
+
}
|
603 |
+
}
|
604 |
+
|
605 |
+
if(!function_exists('geoip_country_code_by_addr')) {
|
606 |
+
function geoip_country_code_by_addr($gi, $addr) {
|
607 |
+
if ($gi->databaseType == GEOIP_CITY_EDITION_REV1) {
|
608 |
+
$record = geoip_record_by_addr($gi,$addr);
|
609 |
+
if ( $record !== false ) {
|
610 |
+
return $record->country_code;
|
611 |
+
}
|
612 |
+
} else {
|
613 |
+
$country_id = geoip_country_id_by_addr($gi,$addr);
|
614 |
+
if ($country_id !== false) {
|
615 |
+
return $gi->GEOIP_COUNTRY_CODES[$country_id];
|
616 |
+
}
|
617 |
+
}
|
618 |
+
return false;
|
619 |
+
}
|
620 |
+
}
|
621 |
+
|
622 |
+
if(!function_exists('geoip_country_name_by_addr_v6')) {
|
623 |
+
function geoip_country_name_by_addr_v6($gi, $addr) {
|
624 |
+
$country_id = geoip_country_id_by_addr_v6($gi,$addr);
|
625 |
+
if ($country_id !== false) {
|
626 |
+
return $gi->GEOIP_COUNTRY_NAMES[$country_id];
|
627 |
+
}
|
628 |
+
return false;
|
629 |
+
}
|
630 |
+
}
|
631 |
+
|
632 |
+
if(!function_exists('geoip_country_name_by_addr')) {
|
633 |
+
function geoip_country_name_by_addr($gi, $addr) {
|
634 |
+
if ($gi->databaseType == GEOIP_CITY_EDITION_REV1) {
|
635 |
+
$record = geoip_record_by_addr($gi,$addr);
|
636 |
+
return $record->country_name;
|
637 |
+
} else {
|
638 |
+
$country_id = geoip_country_id_by_addr($gi,$addr);
|
639 |
+
if ($country_id !== false) {
|
640 |
+
return $gi->GEOIP_COUNTRY_NAMES[$country_id];
|
641 |
+
}
|
642 |
+
}
|
643 |
+
return false;
|
644 |
+
}
|
645 |
+
}
|
646 |
+
|
647 |
+
if(!function_exists('_geoip_seek_country_v6')) {
|
648 |
+
function _geoip_seek_country_v6($gi, $ipnum) {
|
649 |
+
|
650 |
+
# arrays from unpack start with offset 1
|
651 |
+
# yet another php mystery. array_merge work around
|
652 |
+
# this broken behaviour
|
653 |
+
$v6vec = array_merge(unpack( "C16", $ipnum));
|
654 |
+
|
655 |
+
$offset = 0;
|
656 |
+
for ($depth = 127; $depth >= 0; --$depth) {
|
657 |
+
if ($gi->flags & GEOIP_MEMORY_CACHE) {
|
658 |
+
// workaround php's broken substr, strpos, etc handling with
|
659 |
+
// mbstring.func_overload and mbstring.internal_encoding
|
660 |
+
$enc = mb_internal_encoding();
|
661 |
+
mb_internal_encoding('ISO-8859-1');
|
662 |
+
|
663 |
+
$buf = substr($gi->memory_buffer,
|
664 |
+
2 * $gi->record_length * $offset,
|
665 |
+
2 * $gi->record_length);
|
666 |
+
|
667 |
+
mb_internal_encoding($enc);
|
668 |
+
} elseif ($gi->flags & GEOIP_SHARED_MEMORY) {
|
669 |
+
$buf = @shmop_read ($gi->shmid,
|
670 |
+
2 * $gi->record_length * $offset,
|
671 |
+
2 * $gi->record_length );
|
672 |
+
} else {
|
673 |
+
if(fseek($gi->filehandle, 2 * $gi->record_length * $offset, SEEK_SET) != 0) {
|
674 |
+
throw new Exception('GeoIP - File Seek operation failed. IPv6-to-Country resolution aborted.');
|
675 |
+
}
|
676 |
+
$buf = fread($gi->filehandle, 2 * $gi->record_length);
|
677 |
+
}
|
678 |
+
$x = array(0,0);
|
679 |
+
for ($i = 0; $i < 2; ++$i) {
|
680 |
+
for ($j = 0; $j < $gi->record_length; ++$j) {
|
681 |
+
$x[$i] += ord($buf[$gi->record_length * $i + $j]) << ($j * 8);
|
682 |
+
}
|
683 |
+
}
|
684 |
+
|
685 |
+
$bnum = 127 - $depth;
|
686 |
+
$idx = $bnum >> 3;
|
687 |
+
$b_mask = 1 << ( $bnum & 7 ^ 7 );
|
688 |
+
if (($v6vec[$idx] & $b_mask) > 0) {
|
689 |
+
if ($x[1] >= $gi->databaseSegments) {
|
690 |
+
return $x[1];
|
691 |
+
}
|
692 |
+
$offset = $x[1];
|
693 |
+
} else {
|
694 |
+
if ($x[0] >= $gi->databaseSegments) {
|
695 |
+
return $x[0];
|
696 |
+
}
|
697 |
+
$offset = $x[0];
|
698 |
+
}
|
699 |
+
}
|
700 |
+
throw new Exception('Error traversing database. File may be corrupt, please try replacing it ' .
|
701 |
+
'with a new one. You can download it from MaxMind website');
|
702 |
+
return false;
|
703 |
+
}
|
704 |
+
}
|
705 |
+
|
706 |
+
if(!function_exists('_geoip_seek_country')) {
|
707 |
+
function _geoip_seek_country($gi, $ipnum) {
|
708 |
+
$offset = 0;
|
709 |
+
for ($depth = 31; $depth >= 0; --$depth) {
|
710 |
+
if ($gi->flags & GEOIP_MEMORY_CACHE) {
|
711 |
+
// workaround php's broken substr, strpos, etc handling with
|
712 |
+
// mbstring.func_overload and mbstring.internal_encoding
|
713 |
+
$enc = mb_internal_encoding();
|
714 |
+
mb_internal_encoding('ISO-8859-1');
|
715 |
+
|
716 |
+
$buf = substr($gi->memory_buffer,
|
717 |
+
2 * $gi->record_length * $offset,
|
718 |
+
2 * $gi->record_length);
|
719 |
+
|
720 |
+
mb_internal_encoding($enc);
|
721 |
+
} elseif ($gi->flags & GEOIP_SHARED_MEMORY) {
|
722 |
+
$buf = @shmop_read ($gi->shmid,
|
723 |
+
2 * $gi->record_length * $offset,
|
724 |
+
2 * $gi->record_length );
|
725 |
+
} else {
|
726 |
+
if(fseek($gi->filehandle, 2 * $gi->record_length * $offset, SEEK_SET) != 0) {
|
727 |
+
throw new Exception('GeoIP - File Seek operation failed. IPv4-to-Country resolution aborted.');
|
728 |
+
}
|
729 |
+
$buf = fread($gi->filehandle, 2 * $gi->record_length);
|
730 |
+
}
|
731 |
+
$x = array(0,0);
|
732 |
+
for ($i = 0; $i < 2; ++$i) {
|
733 |
+
for ($j = 0; $j < $gi->record_length; ++$j) {
|
734 |
+
$x[$i] += ord($buf[$gi->record_length * $i + $j]) << ($j * 8);
|
735 |
+
}
|
736 |
+
}
|
737 |
+
if ($ipnum & (1 << $depth)) {
|
738 |
+
if ($x[1] >= $gi->databaseSegments) {
|
739 |
+
return $x[1];
|
740 |
+
}
|
741 |
+
$offset = $x[1];
|
742 |
+
} else {
|
743 |
+
if ($x[0] >= $gi->databaseSegments) {
|
744 |
+
return $x[0];
|
745 |
+
}
|
746 |
+
$offset = $x[0];
|
747 |
+
}
|
748 |
+
}
|
749 |
+
throw new Exception('Error traversing database. File may be corrupt, please try replacing it ' .
|
750 |
+
'with a new one. You can download it from MaxMind website');
|
751 |
+
return false;
|
752 |
+
}
|
753 |
+
}
|
754 |
+
|
755 |
+
if(!function_exists('_common_get_org')) {
|
756 |
+
function _common_get_org($gi, $seek_org){
|
757 |
+
$record_pointer = $seek_org + (2 * $gi->record_length - 1) * $gi->databaseSegments;
|
758 |
+
if ($gi->flags & GEOIP_SHARED_MEMORY) {
|
759 |
+
$org_buf = @shmop_read ($gi->shmid, $record_pointer, MAX_ORG_RECORD_LENGTH);
|
760 |
+
} else {
|
761 |
+
fseek($gi->filehandle, $record_pointer, SEEK_SET);
|
762 |
+
$org_buf = fread($gi->filehandle,MAX_ORG_RECORD_LENGTH);
|
763 |
+
}
|
764 |
+
// workaround php's broken substr, strpos, etc handling with
|
765 |
+
// mbstring.func_overload and mbstring.internal_encoding
|
766 |
+
$enc = mb_internal_encoding();
|
767 |
+
mb_internal_encoding('ISO-8859-1');
|
768 |
+
$org_buf = substr($org_buf, 0, strpos($org_buf, "\0"));
|
769 |
+
mb_internal_encoding($enc);
|
770 |
+
return $org_buf;
|
771 |
+
}
|
772 |
+
}
|
773 |
+
|
774 |
+
if(!function_exists('_get_org_v6')) {
|
775 |
+
function _get_org_v6($gi,$ipnum){
|
776 |
+
$seek_org = _geoip_seek_country_v6($gi,$ipnum);
|
777 |
+
if ($seek_org == $gi->databaseSegments) {
|
778 |
+
return NULL;
|
779 |
+
}
|
780 |
+
return _common_get_org($gi, $seek_org);
|
781 |
+
}
|
782 |
+
}
|
783 |
+
|
784 |
+
if(!function_exists('_get_org')) {
|
785 |
+
function _get_org($gi,$ipnum){
|
786 |
+
$seek_org = _geoip_seek_country($gi,$ipnum);
|
787 |
+
if ($seek_org == $gi->databaseSegments) {
|
788 |
+
return NULL;
|
789 |
+
}
|
790 |
+
return _common_get_org($gi, $seek_org);
|
791 |
+
}
|
792 |
+
}
|
793 |
+
|
794 |
+
|
795 |
+
if(!function_exists('geoip_name_by_addr_v6')) {
|
796 |
+
function geoip_name_by_addr_v6 ($gi,$addr) {
|
797 |
+
if ($addr == NULL) {
|
798 |
+
return 0;
|
799 |
+
}
|
800 |
+
$ipnum = inet_pton($addr);
|
801 |
+
return _get_org_v6($gi, $ipnum);
|
802 |
+
}
|
803 |
+
}
|
804 |
+
|
805 |
+
if(!function_exists('geoip_name_by_addr_v6')) {
|
806 |
+
function geoip_name_by_addr ($gi,$addr) {
|
807 |
+
if ($addr == NULL) {
|
808 |
+
return 0;
|
809 |
+
}
|
810 |
+
$ipnum = ip2long($addr);
|
811 |
+
return _get_org($gi, $ipnum);
|
812 |
+
}
|
813 |
+
}
|
814 |
+
|
815 |
+
if(!function_exists('geoip_org_by_addr')) {
|
816 |
+
function geoip_org_by_addr ($gi,$addr) {
|
817 |
+
return geoip_name_by_addr($gi, $addr);
|
818 |
+
}
|
819 |
+
}
|
820 |
+
|
821 |
+
if(!function_exists('_get_region')) {
|
822 |
+
function _get_region($gi,$ipnum){
|
823 |
+
if ($gi->databaseType == GEOIP_REGION_EDITION_REV0){
|
824 |
+
$seek_region = _geoip_seek_country($gi,$ipnum) - GEOIP_STATE_BEGIN_REV0;
|
825 |
+
if ($seek_region >= 1000){
|
826 |
+
$country_code = "US";
|
827 |
+
$region = chr(($seek_region - 1000)/26 + 65) . chr(($seek_region - 1000)%26 + 65);
|
828 |
+
} else {
|
829 |
+
$country_code = $gi->GEOIP_COUNTRY_CODES[$seek_region];
|
830 |
+
$region = "";
|
831 |
+
}
|
832 |
+
return array ($country_code,$region);
|
833 |
+
} else if ($gi->databaseType == GEOIP_REGION_EDITION_REV1) {
|
834 |
+
$seek_region = _geoip_seek_country($gi,$ipnum) - GEOIP_STATE_BEGIN_REV1;
|
835 |
+
//print $seek_region;
|
836 |
+
if ($seek_region < US_OFFSET){
|
837 |
+
$country_code = "";
|
838 |
+
$region = "";
|
839 |
+
} else if ($seek_region < CANADA_OFFSET) {
|
840 |
+
$country_code = "US";
|
841 |
+
$region = chr(($seek_region - US_OFFSET)/26 + 65) . chr(($seek_region - US_OFFSET)%26 + 65);
|
842 |
+
} else if ($seek_region < WORLD_OFFSET) {
|
843 |
+
$country_code = "CA";
|
844 |
+
$region = chr(($seek_region - CANADA_OFFSET)/26 + 65) . chr(($seek_region - CANADA_OFFSET)%26 + 65);
|
845 |
+
} else {
|
846 |
+
$country_code = $gi->GEOIP_COUNTRY_CODES[($seek_region - WORLD_OFFSET) / FIPS_RANGE];
|
847 |
+
$region = "";
|
848 |
+
}
|
849 |
+
return array ($country_code,$region);
|
850 |
+
}
|
851 |
+
}
|
852 |
+
}
|
853 |
+
|
854 |
+
if(!function_exists('geoip_region_by_addr')) {
|
855 |
+
function geoip_region_by_addr ($gi,$addr) {
|
856 |
+
if ($addr == NULL) {
|
857 |
+
return 0;
|
858 |
+
}
|
859 |
+
$ipnum = ip2long($addr);
|
860 |
+
return _get_region($gi, $ipnum);
|
861 |
+
}
|
862 |
+
}
|
863 |
+
|
864 |
+
if(!function_exists('getdnsattributes')) {
|
865 |
+
function getdnsattributes ($l,$ip){
|
866 |
+
$r = new Net_DNS_Resolver();
|
867 |
+
$r->nameservers = array("ws1.maxmind.com");
|
868 |
+
$p = $r->search($l."." . $ip .".s.maxmind.com","TXT","IN");
|
869 |
+
$str = is_object($p->answer[0])?$p->answer[0]->string():'';
|
870 |
+
$str = substr( $str, 1, -1 );
|
871 |
+
return $str;
|
872 |
+
}
|
873 |
+
}
|
874 |
+
|
875 |
+
?>
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: iqpascal
|
|
3 |
Donate link: http://www.redeo.nl/plugins/donate
|
4 |
Tags: spam, block, countries, country, comments, ban, geo, geo blocking, geo ip, block country, block countries, ban countries, ban country, blacklist, whitelist
|
5 |
Requires at least: 3.5.2
|
6 |
-
Tested up to:
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -177,6 +177,13 @@ If storing or sharing an IP address is illegal in your country do not select thi
|
|
177 |
|
178 |
== Changelog ==
|
179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
= 1.1.13 =
|
181 |
|
182 |
* Bugfix on setting defaults when they values already existed.
|
3 |
Donate link: http://www.redeo.nl/plugins/donate
|
4 |
Tags: spam, block, countries, country, comments, ban, geo, geo blocking, geo ip, block country, block countries, ban countries, ban country, blacklist, whitelist
|
5 |
Requires at least: 3.5.2
|
6 |
+
Tested up to: 4.0
|
7 |
+
Stable tag: 1.1.14
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
177 |
|
178 |
== Changelog ==
|
179 |
|
180 |
+
= 1.1.14 =
|
181 |
+
|
182 |
+
* Bugfix: The plugin did not recognise the login page when installed to a subdirectory.
|
183 |
+
* New: You can configure if it auto updates the GeoIP Database. Upon request of those people who have the paid database of MaxMind.
|
184 |
+
* Added Facebook and MSN to list of search engines.
|
185 |
+
* Changed the version of the geoip.inc file to the version of https://github.com/daigo75/geoip-api-php
|
186 |
+
|
187 |
= 1.1.13 =
|
188 |
|
189 |
* Bugfix on setting defaults when they values already existed.
|