root/trunk/robots/maj_session.bot.php
| Revision 1, 409 bytes (checked in by anonymous, 7 years ago) |
|---|
| Line | |
|---|---|
| 1 | #!/usr/bin/php |
| 2 | <? |
| 3 | include ('../includes/includes.inc.php'); |
| 4 | include ('../includes/config/global.inc.php'); |
| 5 | |
| 6 | $db =& DB::connect($dsn); |
| 7 | if (DB::isError($db)) |
| 8 | error_log($_SERVER['HTTP_HOST'].' | '.__FILE__.' | Connexion SQL impossible : '.$db->getMessage()); |
| 9 | |
| 10 | $db->setFetchMode(DB_FETCHMODE_ASSOC); |
| 11 | |
| 12 | $db->query('DELETE FROM session WHERE timestamp<?', array(time()-900) ); |
| 13 | |
| 14 | $db->disconnect(); |
| 15 | ?> |
Note: See TracBrowser
for help on using the browser.
