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


PHP Statistics::getRefererLogs方法代码示例

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


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

示例1: refererkeyword

function refererkeyword()
{
    global $pluginMenuURL, $pluginSelfParam, $configVal;
    $more = false;
    if (defined('TEXTCUBE_NAME')) {
        requireComponent('Textcube.Model.Statistics');
        requireComponent('Textcube.Function.misc');
    } else {
        requireComponent('Tattertools.Model.Statistics');
        requireComponent('Tattertools.Function.misc');
    }
    $data = Setting::fetchConfigVal($configVal);
    $showURL = 0;
    $limitRank = 5;
    $Filtering = array();
    if (!is_null($data)) {
        $showURL = $data['showURL'];
        $limitRank = $data['limitRank'];
        $Filtering = preg_split("/[\\s,]+/", $data['WordFiltering']);
    }
    if (!empty($_POST['showURL'])) {
        $showURL = $_POST['showURL'];
    }
    if (!empty($_POST['showKeywordlistLight'])) {
        $limitRank = $_POST['showKeywordlistLight'];
    }
    $refereres = Statistics::getRefererLogs();
    $keywordlist = array();
    $wordlist = array();
    $record = array();
    $refererURL = array();
    $totalpassedkeyword = 0;
    for ($i = 0; $i < sizeof($refereres); $i++) {
        $record = $refereres[$i];
        if ($i == 0) {
            $referredend = $record['referred'];
        }
        $keyword = "";
        $passthiskeyword = 0;
        list($keyword, ) = bringSearchWord($record['url'], $record['host']);
        foreach ($Filtering as $FilterWord) {
            if (strpos($keyword, $FilterWord) !== false) {
                $passthiskeyword = 1;
                $totalpassedkeyword++;
                break 1;
            }
        }
        if ($passthiskeyword == 0) {
            if (array_key_exists($keyword, $keywordlist)) {
                $refererURL[$keyword][$keywordlist[$keyword]] = $record['url'];
                $keywordlist[$keyword]++;
            } elseif ($keyword) {
                $keywordlist[$keyword] = 1;
                $refererURL[$keyword][0] = $record['url'];
            }
            $word = split(" ", $keyword);
            foreach ($word as $maira) {
                if (array_key_exists($maira, $wordlist)) {
                    $wordlist[$maira]++;
                } elseif ($maira) {
                    $wordlist[$maira] = 1;
                }
            }
        }
    }
    $referredstart = array_key_exists('referred', $record) ? $record['referred'] : null;
    ?>
					 			<h2 class="caption"><span class="main-text"><?php 
    echo _t('리퍼러 검색어 통계') . " (" . Timestamp::formatDate($referredstart) . " ~ " . Timestamp::formatDate($referredend) . ")";
    ?>
</span></h2>

						 		<div id="statistics-counter-inbox" class="data-inbox">
									<div class="title">
										<span class="label"><span class="text"><?php 
    echo _t('총 검색어 개수');
    ?>
</span></span>
										<span class="divider"> : </span>
										<span id="total"><?php 
    echo count($keywordlist);
    ?>
</span>
										<span class="divider"> : </span>
										<span class="label"><span class="text"><?php 
    echo _t('총 리퍼러 개수');
    ?>
</span></span>
										<span class="divider"> : </span>
										<span id="total"><?php 
    echo sizeof($refereres);
    ?>
</span>
										<span class="divider"> : </span>
<?php 
    if ($totalpassedkeyword > 0) {
        ?>
										<span class="label"><span class="text"><?php 
        echo _t('필터링된 리퍼러 개수');
        ?>
//.........这里部分代码省略.........
开发者ID:ragi79,项目名称:Textcube,代码行数:101,代码来源:index.php

示例2: getRefererLogs

function getRefererLogs()
{
    return Statistics::getRefererLogs();
}
开发者ID:ragi79,项目名称:Textcube,代码行数:4,代码来源:common.legacysupport.php


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