Skip to content

Instantly share code, notes, and snippets.

Niko Salminen Kaivosukeltaja

Block or report user

Report or block Kaivosukeltaja

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Kaivosukeltaja
Kaivosukeltaja / profile.php
Last active Jan 21, 2018
Mikseri.net profile page visitor counter
View profile.php
/* == PAGECOUNTER == */
/* == Pitää lukua päivittäisistä vierailijamääristä == */
$pagecounter_cache_key = 'pagecounter_' . $user_id . '_' . date('Y-m-d');
$pagecounter = $cache->get($pagecounter_cache_key);
if (!is_array($pagecounter))
{
$pagecounter = array();
$res = $db->query("SELECT date, count from pagecounter WHERE WEEK(date) = WEEK(CURDATE()) AND user_id = ?", array($user_id));
if ($res->numRows() > 0)
{
You can’t perform that action at this time.