Пример #1
0
/**
	Returns the number of pages displayed in the specified time range
	$range_start : start of range in unix time. see comment at the start of the file  
	$range_end : end of range in unix time. see comment at the start of the file
	site_id : see comment at the start of the file
	url: see comment at the start of the file
*/
function fs_api_get_page_views_range($range_start, $range_end, $site_id = true, $url = null)
{
    require_once dirname(__FILE__) . '/db-sql.php';
    $url_id = null;
    if ($url) {
        $url_id = fs_get_url_id($url);
        if ($url_id === null) {
            return 0;
        }
    }
    return fs_get_page_views_range($site_id, true, $range_start, $range_end, $url_id);
}
Пример #2
0
function fs_get_hit_count($days_ago = null, $site_id = true, $url_id = null)
{
    return fs_get_page_views_range($site_id, true, fs_days_ago_to_unix_time($days_ago), null, $url_id);
}