• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space

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