aboutsummaryrefslogtreecommitdiff
path: root/Autres/crontab.php
diff options
context:
space:
mode:
authorcitizenz7 <citizenz7@protonmail.com>2017-04-20 18:50:55 +0200
committercitizenz7 <citizenz7@protonmail.com>2017-04-20 18:50:55 +0200
commit5fd9fa480f302902328b81f912dd67ce378284f8 (patch)
tree66234843ae2857fda12442e4f7577c527d48977c /Autres/crontab.php
parentebe731862c7c741171138b1083906f391fc35aff (diff)
downloadfreetorrent-5fd9fa480f302902328b81f912dd67ce378284f8.tar.xz
freetorrent-5fd9fa480f302902328b81f912dd67ce378284f8.zip
V.1.4.6
Diffstat (limited to 'Autres/crontab.php')
-rw-r--r--Autres/crontab.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/Autres/crontab.php b/Autres/crontab.php
new file mode 100644
index 0000000..b23b83c
--- /dev/null
+++ b/Autres/crontab.php
@@ -0,0 +1,14 @@
+<?php
+
+//Identifiants SQL
+define('DBHOST','localhost');
+define('DBUSER','c4_freetorrent');
+define('DBPASS','1b10"yujl/qnN2)?L{WtT]),%s)y|(Tm');
+define('DBNAME','c4_freetorrent');
+
+//Connexion SQL
+$db = new PDO("mysql:host=".DBHOST.";port=8889;dbname=".DBNAME, DBUSER, DBPASS);
+$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+$stmt = $db->query('DELETE FROM xbt_announce_log WHERE mtime < (NOW() - INTERVAL 59 MINUTE)');
+?>