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 "
Overall 2018 would not give as great results as your previous year but still it would be OK. Matters may move a bit slow with may be more than average obstacles.
What you say and what you write in office communications or even verbal communication would be important. Your wealth gains and status would depend on your showing your focus and also how well you communicate to others.
January and February would be fair for your career. But yes you may face some more than average obstacles in January and that also all of a sudden. February could give better gains by a well planned and disciplined effort. That’s what your boss would like to have.
March could better for meetings and connections at the office front, your enthusiasm and fun loving nature would touch your colleagues as well . Action also is much needed this time. So stay focused and delivers well.
April 2018 there is mars or Mangal ruler ship now, so take care of your actions. How you communicate to your boss or colleagues makes a difference now. Proper actions may mean gains in some for you or atleast an appreciation from your people around at office.
May 2018 may mean more focus on responsibilities for you. Take up more roles now and stay concentrated in your work. Stress at work or unnecessary travels could mar the pleasure now. Try to avert losses by being more caring with the team now.
June 2018 could be highly favourable, you could become the centre stage now and more focus on you by your colleagues, boss and customers could be there. Take advantage and gain mileage now.
July is a time of slight care, matters could caret some restlessness in office situation. Speak with care with your boss or colleagues. Proper gains and enhancement in salary could come to you by the year end if you take care.
August means a time for much more work- it may be fair for you to take new projects or native. You may be more positive and connect to more people now. You have to control on your restlessness now and may be focus on work more. Yes pleasure is OK but work life balance is needed.
September is a time planets may support you a bit, but again your email, verbal and other communication has to be proper with your office colleagues and your boss. Your image needs care and if you are a able to handle this you are done with this month.
October is a time when you may have travels and yes your focus on your office responsibilities may be on an increase here. You need to focus and attend to your roles well to get the best benefits out of the situation. Women folk or females around you need more care. Giving more respect and talking plus communicating with care would help a
November 2018 you could be more emotionally oriented this time so just take care and stay stable.Connect and communicate to people with care. People have to be treated with care for best results now. This time could be eventful. More socials at office and connections. Yes people may oppose you now so just be on care on this part.
December 2018 could mean more of socials & having fun at office and with colleagues. ,responsibilities need to be attended now as well. Once again you communication needs proper care in office matters . There could be more office related travel if in travelling job and new business connections and partnerships could be there. Enjoy the fun and ebb now in the air in your office.
Your complete FULL CAREER HOROSCOPE and 3 years predictions with Remedies! . CLICK HERE