mirror of
https://git.v0l.io/Kieran/void.cat.git
synced 2025-03-20 05:41:42 +01:00
23 lines
481 B
PHP
23 lines
481 B
PHP
<?php
|
|
include("db.php");
|
|
|
|
echo 'Cleaning files...';
|
|
|
|
$db = new DB();
|
|
$fl = $db->GetExpiredFiles();
|
|
|
|
foreach($fl as $f) {
|
|
if(unlink($f->path)) {
|
|
$db->DeleteFile($f);
|
|
echo 'Deleted file: ' . $f->filename . ' (' . $f->hash160 . ')\n';
|
|
}else{
|
|
echo 'Cant delete file ' . $f->hash160 . '\n';
|
|
}
|
|
}
|
|
|
|
if(count($fl) > 0){
|
|
$discord_data = array("content" => 'Deleted ' . count($fl) . ' expired files.');
|
|
include('discord.php');
|
|
}
|
|
?>
|