當前位置: 首頁>>代碼示例>>PHP>>正文


PHP wfUtils::encrypt方法代碼示例

本文整理匯總了PHP中wfUtils::encrypt方法的典型用法代碼示例。如果您正苦於以下問題:PHP wfUtils::encrypt方法的具體用法?PHP wfUtils::encrypt怎麽用?PHP wfUtils::encrypt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在wfUtils的用法示例。


在下文中一共展示了wfUtils::encrypt方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: wfLogHumanHeader

    public static function wfLogHumanHeader()
    {
        $URL = admin_url('admin-ajax.php?action=wordfence_logHuman&hid=' . wfUtils::encrypt(self::$hitID));
        $URL = preg_replace('/^https?:/i', '', $URL);
        #Load as external script async so we don't slow page down.
        echo <<<EOL
<script type="text/javascript">
(function(url){
if(/(?:Chrome\\/26\\.0\\.1410\\.63 Safari\\/537\\.31|WordfenceTestMonBot)/.test(navigator.userAgent)){ return; }
var wfscr = document.createElement('script');
wfscr.type = 'text/javascript';
wfscr.async = true;
wfscr.src = url + '&r=' + Math.random();
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(wfscr);
})('{$URL}');
</script>
EOL;
    }
開發者ID:rinodung,項目名稱:myfreetheme,代碼行數:18,代碼來源:wordfenceClass.php

示例2: wfLogHumanHeader

    public static function wfLogHumanHeader()
    {
        self::$hitID = self::getLog()->logHit();
        if (self::$hitID) {
            $URL = home_url('/?wordfence_logHuman=1&hid=' . wfUtils::encrypt(self::$hitID));
            $URL = addslashes(preg_replace('/^https?:/i', '', $URL));
            #Load as external script async so we don't slow page down.
            echo <<<HTML
<script type="text/javascript">
(function(url){
\tif(/(?:Chrome\\/26\\.0\\.1410\\.63 Safari\\/537\\.31|WordfenceTestMonBot)/.test(navigator.userAgent)){ return; }
\tvar addEvent = function(evt, handler) {
\t\tif (window.addEventListener) {
\t\t\tdocument.addEventListener(evt, handler, false);
\t\t} else if (window.attachEvent) {
\t\t\tdocument.attachEvent('on' + evt, handler);
\t\t}
\t};
\tvar removeEvent = function(evt, handler) {
\t\tif (window.removeEventListener) {
\t\t\tdocument.removeEventListener(evt, handler, false);
\t\t} else if (window.detachEvent) {
\t\t\tdocument.detachEvent('on' + evt, handler);
\t\t}
\t};
\tvar evts = 'contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop keydown keypress keyup mousedown mousemove mouseout mouseover mouseup mousewheel scroll'.split(' ');
\tvar logHuman = function() {
\t\tvar wfscr = document.createElement('script');
\t\twfscr.type = 'text/javascript';
\t\twfscr.async = true;
\t\twfscr.src = url + '&r=' + Math.random();
\t\t(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(wfscr);
\t\tfor (var i = 0; i < evts.length; i++) {
\t\t\tremoveEvent(evts[i], logHuman);
\t\t}
\t};
\tfor (var i = 0; i < evts.length; i++) {
\t\taddEvent(evts[i], logHuman);
\t}
})('{$URL}');
</script>
HTML;
        }
    }
開發者ID:ashenkar,項目名稱:sanga,代碼行數:44,代碼來源:wordfenceClass.php

示例3: wp_head

 public static function wp_head()
 {
     $URL = admin_url('admin-ajax.php?action=wordfence_logHuman&hid=' . wfUtils::encrypt(self::$hitID));
     echo '<script type="text/javascript">var src="' . $URL . '"; if(window.location.protocol == "https:"){ src = src.replace("http:", "https:"); } var wfHTImg = new Image();  wfHTImg.src=src;</script>';
 }
開發者ID:verbazend,項目名稱:AWFA,代碼行數:5,代碼來源:wordfenceClass.php


注:本文中的wfUtils::encrypt方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。