Is there a service out there that provides public API for compressing CSS or Javascript?
(Like imgur let's you upload images trough PHP and get the image URL)
Google Closure Compiler let's you send JavaScript code with POST request and returns optimalized code.