Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, April 20, 2024

File: [Platon] / phpWebLogAnalyzer / utils / remote-log.php (download)

Revision 1.3, Fri May 27 16:30:48 2005 UTC (18 years, 10 months ago) by nepto


Changes since 1.2: +4 -4 lines

Updated copyright year, e-mail address and URL.

<?php

/*
 * phpWebLogAnalyzer - powerful weblog and analyzer
 *
 * utils/remote-log.php - remote HTTP POST logger
 * ____________________________________________________________
 *
 * Developed by Ondrej Jombik <nepto@platon.sk>
 * Copyright (c) 2001-2005 Platon SDG, http://platon.sk/
 * All rights reserved.
 *
 * See README file for more information about this software.
 * See COPYING file for license information.
 *
 * Download the latest version from
 * http://platon.sk/projects/phpWebLogAnalyzer/
 */

/* $Platon: phpWebLogAnalyzer/utils/remote-log.php,v 1.2 2003/01/27 00:57:49 nepto Exp $ */

// you may need to change this to './phpWebLogAnalyzer.inc.php'
require_once '../phpWebLogAnalyzer.inc.php';

header('Content-type: text/plain');

if (isset($HTTP_POST_VARS['data'])) {
    $data   = stripslashes($HTTP_POST_VARS['data']);
    $weblog = unserialize($data);

    if (is_object($weblog)) {

        // Here is place for you local settings
        // You can set up DSN or others configuration options as well
        // $weblog->setDSN('mysql://test:test@localhost/test');

        for ($i = 0; $i <= 3; $i++) {
            switch ($i) {
                case 0: $ret = $weblog->reconnect();         break;
                case 1: $ret = $weblog->setDynamicValues();  break;
                case 2: $ret = $weblog->writeValues();       break;
                case 3: echo "1\nRemote log suceed";         exit;
            }
            if (DB::isError($ret)) {
                echo "0\n";
                echo $ret->getMessage();
                exit;
            }
        }
    }
}

echo "0\nBad input data";

?>

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