Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, March 29, 2024

File: [Platon] / phpWebLogAnalyzer / test.php (download)

Revision 1.6, Thu Feb 28 20:35:47 2002 UTC (22 years, 1 month ago) by jombik9

Changes since 1.5: +22 -9 lines

 * 27/02/2002 - active session query caching added
 *            - PHP support utils

<?php

function get_mtime()
{
    $mtime = microtime();
    $mtime = explode(" ", $mtime);
    $mtime = $mtime[1] + $mtime[0];

    return $mtime;
}

$start_time = get_mtime();

include("./phpWebLogAnalyzer.inc.php");

$weblog = new Web_Log("mysql://test:test@localhost/test");

$weblog->enableRawLog();
//$weblog->disableRawLog();

$weblog->registerAccess(3);

echo ("<hr>Session ID: "
        . $weblog->getPropertyValue("session_id") . "<br>");

if (0) {
    $weblog->enableRawLog();
    echo("<hr>Raw session count: "
            . $weblog->getSessionsCount()
            . "<br>");
    $weblog->disableRawLog();
    echo("<hr>Normal session count: "
            . $weblog->getSessionsCount()
            . "<br>");

    $weblog->enableRawLog();
    echo "<hr>Raw active sessions: ";
    $active_sessions = $weblog->getActiveSessions();
    var_dump($active_sessions);
    echo "<br>";

    $weblog->disableRawLog();
    echo "<hr>Normal active sessions: ";
    $active_sessions = $weblog->getActiveSessions();
    var_dump($active_sessions);
    echo "<br>";
}

echo("<hr>Processing time: "
        . sprintf("%.2f", get_mtime() - $start_time));

?>

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top