Well one of the problems I faced doing this for PHP was that I had to run a server with the PHP web-application on it, but that means setting up a dedicated server just for the integration testing. Which is anything but a desired solution. So I started looking for a way to have this run locally, using a small server you can start-up and kill during the test run.
To solve this, at least in part, I started setting up a Maven project in Java, that could proxy any incoming request to the PHP-cgi interface and relay the result back to the browser. Now it is nowhere near finished, but you can take a look at the initial work on the github project page.