Doesn’t CodeKit do this automagically with a bit of configuration? I know it does CSS and JS, and I’m pretty sure it’ll compress HTML as well now.
If you can’t use CodeKit, perhaps something like the HTML5 Boilerplate ant build script would be useful? If you know what you’re doing, it’s pretty easily modifiable. You can also make your own ant script with a bit of XML know-how.
Searching for online php compression and/or online html compression brings up relavent results. However you do not need to do this. It will bring you no visible speed results. If you wish to compress the correct way do it view htaccess. That will speed up your site dramatically.