define('wpadtiddos_seconds_limit_GET',1);
define('wpadtiddos_seconds_limit_XHR',3);
class wp_antiddos
{
var $enable = true;
var $hits_limit_GET = 3; // hits limit for GET requests (per wpadtiddos_seconds_limit_GET second)
var $hits_limit_XHR = 3; // hits limit for XHR requests (per wpadtiddos_seconds_limit_XHR second)
var $seconds_limit_POST = 3; // seconds limit for POST requests
var $seconds_limit_AUTH = 3; // seconds limit for AUTH (Password) requests
var $visitor; // status of visitor = raw|cool|warm|hot
var $warm_level; // number of hits for last $seconds_limit seconds that cause visitor`s status turn to warm
var $auto = true; // block visitors by AntiDDOS
var $delay_time = 30; // seconds of delay of blocked visitors
var $block_cnet = true; // block all C class net.
var $cloudflare = true; // convert Cloudflare HTTP_CF_CONNECTING_IP to REMOTE_ADDR
var $send_header = false; // send "WP_AntiDDOS: yes" header for debug purposes
var $only_params_enabled = false; // Only Params feature enabled
var $only_params = 's'; // the only GET/POST params that trigger checkup
var $status, $error_msg;
var $conn; // mysql connection
var $hits = false; // actual hits number for current IP
var $cookie = ''; // wpantiddos cookie value that prevents anti DDOS processing
var $table_name = '';
var $pass_param = 'pwd'; // name of POST parameter that indentify Login (AUTH) request
var $delay_message = 'Our server is currently overloaded, your request will be repeated automatically in %s seconds';
var $delay_message_auth = 'Our server is currently overloaded, your request will be repeated automatically in %s seconds';
public function __construct()
{
if (isset($GLOBALS['wp_antiddos_instance']))
return;
else
$GLOBALS['wp_antiddos_instance'] = &$this;
if ($_SERVER['REMOTE_ADDR']=='127.0.0.1')
return;
$this->conn = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD);
$ok = mysqli_select_db($this->conn,DB_NAME);
if (!$ok) return false;
$this->get_options();
// plugin disabled
if (!$this->enable) return;
// current request is admin's one
if (isset($_COOKIE['wpantiddos']) && $_COOKIE['wpantiddos']==$this->cookie) return;
if ($this->only_params_enabled)
if (!$this->only_param_detected())
return;
// detect request type and limits
if ($this->xhr_request())
{
if ($this->hits_limit_XHR=='ANY') return;
$request_type = 'xhr';
$hits_limit = $this->hits_limit_XHR;
$seconds_limit = wpadtiddos_seconds_limit_XHR;
}
elseif ($_POST && isset($_POST[$this->pass_param]) )
{
if ($this->seconds_limit_AUTH=='ANY') return;
$request_type = 'auth';
$seconds_limit = $this->seconds_limit_AUTH;
$this->only_params .= ' '.$this->pass_param;
$hits_limit = 1;
}
elseif ($_POST)
{
if ($this->seconds_limit_POST=='ANY') return;
$request_type = 'post';
$hits_limit = 1;
$seconds_limit = $this->seconds_limit_POST;
}
else
{
if ($this->hits_limit_GET=='ANY') return;
$request_type = 'get';
$hits_limit = $this->hits_limit_GET;
$seconds_limit = wpadtiddos_seconds_limit_GET;
}
if ($this->send_header)
header("WP_AntiDDOS: yes");
if ($this->cloudflare)
{
if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))
$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP'];
}
$this->ip = $_SERVER['REMOTE_ADDR'];
if ($this->block_cnet)
$this->ip = substr($this->ip,0,strrpos($this->ip,'.')+1);
$this->warm_level = ceil($hits_limit/2);
try
{
$res = mysqli_query($this->conn,"SELECT count(*) kount FROM $this->table_name WHERE ip='".addslashes($this->ip)."' AND tstamp>".(time()-$seconds_limit)." AND type='$request_type'");
$row = mysqli_fetch_assoc($res);
if (!$row)
$this->error_msg = 'Error detected';
$this->hits = @$row['kount']+1; // consider current request too
if ($this->hits==0) // if no hits from this IP
$this->visitor = "new";
elseif ($this->hits>$hits_limit)
$this->visitor = "hot";
elseif ($this->hits>=$this->warm_level)
$this->visitor = "warm";
else
$this->visitor = "cool";
// add current hit
mysqli_query($this->conn,"INSERT INTO $this->table_name SET ip='$this->ip', type='$request_type', tstamp=".time());
// cleanup ip list
$clear_time = max($this->delay_time,$seconds_limit);
mysqli_query($this->conn,"DELETE FROM $this->table_name WHERE tstamp<".(time()-$clear_time));
}
catch(Exception $e)
{
$this->error_msg = $e->getString();
$this->status = 'error';
mysqli_close($this->conn);
return;
}
mysqli_close($this->conn);
if (!empty($this->error_msg) )
{
$this->status = 'error';
}
if ($this->auto && $this->visitor=='hot')
{
header('HTTP/1.0 503 Service Unavailable');
header('Status: 503 Service Unavailable');
header("Retry-After: ".($this->delay_time+1)); // submit form first if POST request
if (!$_POST)
print "
IPL-2017 MS Dhoni removed Captain as Rising Pune Supergiants-steve smith replaces-saturn shani sade sati & dhaiya?
Mahendra singh dhoni was removed on 19 Feb. 2017 as a captain of Indian Premier League (IPL) franchise of rising pune super against league (IPL).
It is said that he has been replaced by the younger Australian stave smith. So his being a captain fro Indian and franchise matches has ended.
We here in this article want to explore the astrological causes for the same & predict how it would be for him in the year 2017
What is the role of Saturn(shani) or shani dhaiya(sade sati) in removal of dhoni as captaincy for franchise cricket?
Mahendra Singh Dhoni
7th July, 1981
11:11
Ranchi, Jharkhand, India
Now Saturn(shani) has transited into his fourth house(bhava) of public image and aspects his house(bhava) of career one can clearly see.
In his natal chart Saturn(shani) rules the sixth house(bhava) of obstacles with its mool trikona sign there and also the fifth house(bhava) of gains and luck in speculations to do with cricket itself.
Saturn(shani) is in the ascendant or the first house(bhava) of the natal horoscope of mahendra singh dhoni aspect his secondary house(bhava) of profession and career and relationships that is the seventh house(bhava).
Saturn(shani) gives malefic energy to moon or mind and also the lord of gains and money ruling the eleventh house(bhava).
Saturn(shani) is also very close to Jupiter(guru) that is close to Saturn(shani) Jupiter(guru) rules the fourth hsouse of family and image and yes conveyance for him.
The planet Pluto the planet of suddenness is very near Saturn(shani) in the natal chart. Jupiter(guru) is not very strong in the Virgo sign or kanya rashi.
Jupiter(guru) is in Libra or tula infact and about to be retrograde . It’s not a healthy Jupiter(guru) that would help his image.
Rahu is transting the Leo sign or simha rashi and aspecting the fourth house(bhava) of image form the twelfth house(bhava).
So one can clearly see multiple afflictions affecting the fourth house(bhava) of image and yes Pluto there resulting in sudden down fall or loss of position for dhoni.
Saturn(shani)’s mooltrikona rashi kumbha rashi rules the sixth house(bhava) and also rules Capricorn or the makar rashi. So over all in 2017 he will retain his positions.
One can clearly see that the transit of Saturn(shani) in January 2017 has a clear impact on career and money flows and over all image of ms dhoni ji.
When Saturn(shani) or shani improves a bit in strength by march onwards he would gain more in stability in 2017.Some over all relief would come after September 2017 when Jupiter(guru) is in Virgo sign or kanya rashi.
2018 he would gain in money and status somehow- something could happen.
what does satrun do when in fourth house or bhava?
The planet Saturn or Shani brings a mix of both positive and negative shades as Saturn is a natural malefic and fourth hsoue or bhava rules mother,conveyance home family and public image. The lives of these locals will be both troublesome and also with some gains as Saturn gains some strength in kendra bhava.
The locals of this arrangement of Saturn(shani) in fourth house would be especially dedicated towards their public,home,family as Saturn gains some strength in the kendra bhava giving some discipline and good effects. In genuine words, but at the same time the malefic nature of shani or Saturn would bring in trouble to mother, more dryness in family and also issues to the conveyances and public image.
We wish him all the best in his life. He has been a valuable gem to the Indian cricket.