Yet another attempt to capture output from php