当前位置: 首页>>代码示例>>PHP>>正文


PHP wfUtils::doNotCache方法代码示例

本文整理汇总了PHP中wfUtils::doNotCache方法的典型用法代码示例。如果您正苦于以下问题:PHP wfUtils::doNotCache方法的具体用法?PHP wfUtils::doNotCache怎么用?PHP wfUtils::doNotCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在wfUtils的用法示例。


在下文中一共展示了wfUtils::doNotCache方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: do503

 public function do503($secsToGo, $reason)
 {
     wfConfig::inc('total503s');
     wfUtils::doNotCache();
     header('HTTP/1.1 503 Service Temporarily Unavailable');
     header('Status: 503 Service Temporarily Unavailable');
     if ($secsToGo) {
         header('Retry-After: ' . $secsToGo);
     }
     require_once 'wf503.php';
     exit;
 }
开发者ID:TomFarrow,项目名称:wordpress-stackable,代码行数:12,代码来源:wfLog.php

示例2: do503

 public function do503($secsToGo, $reason)
 {
     $this->initLogRequest();
     $this->currentRequest->statusCode = 403;
     if (!$this->currentRequest->action) {
         $this->currentRequest->action = 'blocked:wordfence';
     }
     if (!$this->currentRequest->actionDescription) {
         $this->currentRequest->actionDescription = "blocked: " . $reason;
     }
     $this->logHit();
     wfConfig::inc('total503s');
     wfUtils::doNotCache();
     header('HTTP/1.1 503 Service Temporarily Unavailable');
     header('Status: 503 Service Temporarily Unavailable');
     if ($secsToGo) {
         header('Retry-After: ' . $secsToGo);
     }
     require_once 'wf503.php';
     exit;
 }
开发者ID:ashenkar,项目名称:sanga,代码行数:21,代码来源:wfLog.php

示例3: veryFirstAction


//.........这里部分代码省略.........
                 //Reset login failure counter
                 header('Location: ' . wp_login_url());
                 exit;
             } else {
                 if ($_GET['func'] == 'unlockAllIPs') {
                     wordfence::status(1, 'info', "Request received via unlock email link to unblock all IPs.");
                     $wfLog->unblockAllIPs();
                     $wfLog->unlockAllIPs();
                     delete_transient('wflginfl_' . bin2hex(wfUtils::inet_pton(wfUtils::getIP())));
                     //Reset login failure counter
                     header('Location: ' . wp_login_url());
                     exit;
                 } else {
                     if ($_GET['func'] == 'disableRules') {
                         wfConfig::set('firewallEnabled', 0);
                         wfConfig::set('loginSecurityEnabled', 0);
                         wordfence::status(1, 'info', "Request received via unlock email link to unblock all IPs via disabling firewall rules.");
                         $wfLog->unblockAllIPs();
                         $wfLog->unlockAllIPs();
                         delete_transient('wflginfl_' . bin2hex(wfUtils::inet_pton(wfUtils::getIP())));
                         //Reset login failure counter
                         wfConfig::set('cbl_countries', '');
                         //unblock all countries
                         header('Location: ' . wp_login_url());
                         exit;
                     } else {
                         echo "Invalid function specified. Please check the link we emailed you and make sure it was not cut-off by your email reader.";
                         exit;
                     }
                 }
             }
         } else {
             if ($wfFunc == 'detectProxy') {
                 wfUtils::doNotCache();
                 if (wfUtils::processDetectProxyCallback()) {
                     self::getLog()->getCurrentRequest()->action = 'scan:detectproxy';
                     //Exempt a valid callback from live traffic
                     echo wfConfig::get('detectProxyRecommendation', '-');
                 } else {
                     echo '0';
                 }
                 exit;
             }
         }
     }
     // Sync the WAF data with the database.
     if (!WFWAF_SUBDIRECTORY_INSTALL && ($waf = wfWAF::getInstance())) {
         try {
             $configDefaults = array('apiKey' => wfConfig::get('apiKey'), 'isPaid' => wfConfig::get('isPaid'), 'siteURL' => site_url(), 'homeURL' => home_url(), 'whitelistedIPs' => (string) wfConfig::get('whitelisted'), 'howGetIPs' => (string) wfConfig::get('howGetIPs'), 'other_WFNet' => wfConfig::get('other_WFNet', true), 'pluginABSPATH' => ABSPATH);
             foreach ($configDefaults as $key => $value) {
                 $waf->getStorageEngine()->setConfig($key, $value);
             }
             if (class_exists('wfWAFIPBlocksController')) {
                 wfWAFIPBlocksController::synchronizeConfigSettings();
             }
             if (empty($_GET['wordfence_syncAttackData'])) {
                 $lastAttackMicroseconds = $wpdb->get_var("SELECT MAX(attackLogTime) FROM {$wpdb->base_prefix}wfHits");
                 if (get_site_option('wordfence_lastSyncAttackData', 0) < time() - 4) {
                     if ($waf->getStorageEngine()->hasNewerAttackData($lastAttackMicroseconds)) {
                         if (get_site_option('wordfence_syncingAttackData') <= time() - 60) {
                             // Could be the request to itself is not completing, add ajax to the head as a workaround
                             $attempts = get_site_option('wordfence_syncAttackDataAttempts', 0);
                             if ($attempts > 10) {
                                 add_action('wp_head', 'wordfence::addSyncAttackDataAjax');
                                 add_action('login_head', 'wordfence::addSyncAttackDataAjax');
                                 add_action('admin_head', 'wordfence::addSyncAttackDataAjax');
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:67,代码来源:wordfenceClass.php

示例4: redirect

 private function redirect($URL)
 {
     wfUtils::doNotCache();
     wp_redirect($URL, 302);
     exit;
 }
开发者ID:uwmadisoncals,项目名称:Cluster-Plugins,代码行数:6,代码来源:wfLog.php

示例5: site_url

<?php

wfUtils::doNotCache();
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>You are temporarily locked out</title>
</head>
<body>
<h1>You are temporarily locked out</h1>
<p style="width: 500px;">
	You have been temporarily locked out of this system. This means
	that you will not be able to sign-in or use several other features that may compromise security.
	Please try back in a short while.
	<ul>
	<li><a href="<?php 
echo site_url();
?>
">Return to the site home page</a></li>
	<li><a href="<?php 
echo admin_url();
?>
">Attempt to return to the admin login page (you may still be locked out)</a></li>
	</ul>
	<br /><br />
	<?php 
require 'wfUnlockMsg.php';
开发者ID:Jerram-Marketing,项目名称:Gummer-Co,代码行数:31,代码来源:wfLockedOut.php

示例6: ajax_logHuman_callback

 public static function ajax_logHuman_callback()
 {
     wfUtils::doNotCache();
     $hid = $_GET['hid'];
     $hid = wfUtils::decrypt($hid);
     if (!preg_match('/^\\d+$/', $hid)) {
         exit;
     }
     $db = new wfDB();
     global $wpdb;
     $p = $wpdb->base_prefix;
     $db->queryWrite("update LOW_PRIORITY {$p}" . "wfHits set jsRun=1 where id=%d", $hid);
     if (!headers_sent()) {
         //suppress content-type warning in chrome
         header('Content-type: image/gif');
     }
     die("");
 }
开发者ID:verbazend,项目名称:AWFA,代码行数:18,代码来源:wordfenceClass.php


注:本文中的wfUtils::doNotCache方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。