I’ve recently updated my JS bookmarklet webdav-js and added in some new features including tracking the history state, back button support and proper navigation.
The main thinking behind the bookmarklet is to enable easy manipulation of WebDAV shares without leaving the browser. This bookmarklet allows you to, at the click of the button, browse and upload to WebDAV shares, all within the browser. I’m working on copy/move functionality but currently it supports the basics.
I recently had a discussion with a co-worker as to whether or not it would be possible to upload files to a WebDAV server via AJAX and in doing so discovered it is indeed totally possibly to do so and so I went on a little bit of a mission and made a pretty basic interface for apache that replaced the standard directory listing and have also made a bookmarklet.
There’s no demo I’m afraid, however the bookmarklet should work on just about any WebDAV server (at least, it worked on mine…), but you won’t have pretty code highlighting :(.
I’ve recently had to quickly parse an Apache log file, to get basic usage statistics for a site over a month and wanted the ability to quickly process any general logs and store them in a MySQL table, so I’ve made a small package class.log.
Included in the package are:
class.log.php (the main class)
class.log.processor.php (an interface for a log processor, very basic!!)
class.log.output.php (a simple extension of the processor (outputs <p> tags with <span>s)
class.log.mysql.php (a simple mysql importer of the processed data)
parse.php (a simple implementation, bringing all the classes together)
The class is designed to use one line at a time from the log retrieved, and the regular expression specified in class.log.php can be modified to parse different types of logs as long as the matches array is also updated.
I’ve only used this for apache logs currently, which it managed quite well, I’m not sure if I’d use this script in an automated script, but I’ll leave that for you to decide.
As other scripts, this class is available under the Creative Commons Share Alike Attribution license.
Edit: Minor update, made class more generic and added more comments.