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 :
add after :
find
add BEFORE
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);