Code:
<?php /*****************************************************************************/ /* rsslog.php - A simple log message reciever and sender via RSS */ /* */ /* (c) 2011 by Christian Mayer */ /* Licenced under the GPLv3 */ /*****************************************************************************/ // There are diffentent modes of operation // 1. Creating a new log line: // URL parameter "c": the content of the log // URL parameter "t[]": a tag for later filtering. Multiple might be given // URL parameter "h": a header(title) for the entry; maybe empty // 2. Receive the log as RSS: // URL parameter "f": The (optional) filter, only log lines with a tag // that fit this string are sent // URL parameter "state": get only rows with state=value // 3. Dump all the content in a HTML page: // URL parameter "dump" - no value needed // 4. Remove old content: // URL parameter "r": the timestamp (seconds since 1970) of the oldest log // line to keep // 5. Get content as JSON: // URL parameter "j" // 6. Update state: // URL parameter "u" id of row // URL parameter "state": new state // look where to store DB if (is_dir('/etc/wiregate/rss')) $dbfile = '/etc/wiregate/rss/rsslog.db'; else $dbfile = 'rsslog.db';
Kommentar