[ Index ] |
|
Code source de b2evolution 2.1.0-beta |
[Code source] [Imprimer] [Statistiques]
This file implements the Hit class. This file is part of the evoCore framework - {@link http://evocore.net/} See also {@link http://sourceforge.net/projects/evocms/}.
Author: | blueyed: Daniel HAHLER. |
Author: | fplanque: Francois PLANQUE. |
Copyright: | (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/} |
Version: | $Id: _hit.class.php,v 1.3 2007/09/18 00:00:59 fplanque Exp $ |
Poids: | 781 lignes (23 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
Hit:: (11 méthodes):
Hit()
detect_admin_page()
detect_referer()
detect_useragent()
log()
record_the_hit()
get_user_agent()
get_remote_host()
is_new_view()
is_good_hit()
is_browser_reload()
Hit() X-Ref |
Constructor |
detect_admin_page() X-Ref |
Detect admin page |
detect_referer() X-Ref |
Detect Referer (sic!). Due to potential non-thread safety with getenv() (fallback), we'd better do this early. referer_type: enum('search', 'blacklist', 'referer', 'direct'); 'spam' gets used internally |
detect_useragent() X-Ref |
Set {@link $user_agent} and detect the browser. This function also handles the relations with T_useragents and sets {@link $agent_type}. |
log() X-Ref |
Log a hit on a blog page / rss feed. This function should be called at the end of the page, otherwise if the page is displaying previous hits, it may display the current one too. The hit will not be logged in special occasions, see {@link $ignore} and {@link is_good_hit()}. It will call {@link Hitlist::dbprune()} to do the automatic pruning of old hits in case of auto_prune_stats_mode == "page". return: boolean true if the hit gets logged; false if not |
record_the_hit() X-Ref |
This records the hit. You should not call this directly, but {@link Hit::log()} instead! However, if a Plugin registers the {@link Plugin::AppendHitLog() AppendHitLog event}, it could be necessary to call this as a shutdown function. |
get_user_agent() X-Ref |
Get the User agent's signature. return: string |
get_remote_host( $allow_nslookup = false ) X-Ref |
Get the remote hostname. return: string |
is_new_view() X-Ref |
Determine if a hit is a new view (not reloaded, (internally) ignored or from a robot). 'Reloaded' means: visited before from the same user (in a session) or from same IP/user_agent in the last {@link $Settings reloadpage_timeout} seconds. This gets queried by the Item objects before incrementing its view count (if the Item gets viewed in total ({@link $dispmore})). return: boolean |
is_good_hit() X-Ref |
Is this a good hit? This means "no spam". return: boolean |
is_browser_reload() X-Ref |
Is this a browser reload (F5)? return: boolean true on reload, false if not. |
Généré le : Thu Nov 29 23:58:50 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |