当前位置: 首页>>代码示例>>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;未经允许,请勿转载。