most of spam and splog i receive is come from isreal ?!!
is any way to block registeration and comments from specific country
most of spam and splog i receive is come from isreal ?!!
is any way to block registeration and comments from specific country
yes there is a plugin similar to what you like, http://wpmudevorg.wordpress.com/project/Limit-Country-Signups
this will limit only one country to singup i need to prevent only one country .. singup and comment
Modify it then.
:-)
thats why I gave you the link, I mean come on, if the plugin checks if you are coming from a certain country and then if you are coming from the right country, allows you to sign up, you just negate that check and its done :-)
meaning all countries except the one are allowed to sign up...
doesn't strike me as too hard to manage...
or ban them from the server level.
apf -d
Yummy. Love it. :D
i edit it ...
now i wanna to create option page under wpmu admin menu .. where to begin
<?php
/*
Plugin Name: ban Country Signups
Plugin URI: http://mychatoo.com
Description: Allows the site admin to ban signups to a specific country.
Version: 0.1
Author: Dr.Mazika .. i got code from Stuart Limit-Country-Signups and edit it
Author URI: http://mychatoo.com
*/
/* Copyright 2008 Dr.Mazika (email : admin.mazika@hotmail.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/**
* Country lookup code
*/
function zika_ban_country_signups() {
$ip = $_SERVER['REMOTE_ADDR'];
$url = 'http://api.hostip.info/country.php?ip='.$ip;
$lines_array = file($url);
$country = $lines_array[0];
$err_msg = 'Sorry, your country is banned from register . You appear to be coming from the following country code: ' . $country;
if($country == 'NZ') {
wp_die( $err_msg );
}
}
add_filter('signup_header', 'zika_ban_country_signups');
/*
ToDo
1.Option Page
- Limit/Ban[dropdown] .. Country[dropdown]
- Registeration / Comment / View
*/
?>
I just load up a deny at the htaccess level. simpler.
We do ours at the firewall. The traffic never gets to the webservers. Decreases load on the boxes which is a plus.
What's with all of the sig links all of the sudden?