• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Chevereto Logs

Danny.Domb

👽 Chevereto Freak
Hey guys =D
I created a little logs script for you using text files, so no database needed ;)

First of all, in the root of your chevereto script, create a folder named : logs

*** I strongly recommends to copy the .htaccess from images/ to logs/ otherwise... everybody will have access to your logs.
** If you want to view your logs, open any ftp programs and download the file
* File are named by DAY-MONTH-YEAR.txt

The followings is logged :

H:M:S (filename) Upload by IP
19:07:10 - (firefosss.png) Upload by 127.0.0.1


then for the script :

open Engine.php

find :
Code:
<?

add after :
Code:
function logChevereto($image)
{
    $time = date('G\:i\:s');
    $log = date('d\-m\-Y');
    $data = $time.' - ('.$image.') Upload by '.$_SERVER['REMOTE_ADDR']."\n";
        
    $file = 'logs/'.$log.'.txt';
    
    if (file_exists('logs/'))
    {
        $fh = fopen($file, 'a') or die('Can not open the log file');
        fwrite($fh, $data);
        fclose($fh);
    }
}

find
Code:
            if (empty($resize)) {
                // Haga como si nada...
                copy($handlework, DIR_IM.$name);
                $titulo = UPLOAD_OK.ESP_TITULO;
            }

add BEFORE
Code:
logChevereto($name);
 
Back
Top