I have a ton of stuff written which does things similar to what you're describing. Actually, the first thing you list is almost exactly what I have. Plus, I have the upload code from LRCdb. Anyway, I'll dig up my code when I get a chance and let you know when I can send it. Of course, you'd still have to do some modifications (if not heavy ones) to get it to work the way you want and with your setup, but it will give you a jumpstart, and a working example.
Ok, I've got it. It's code I hacked together in a few hours for Justin a while back. Not pretty, but it works. PM me with a place to send it. 