Transparent PHP 'emulator' for PhantomJS