In regards to Can a PHP Proxy call Javascript functions like a click I'm investigating a solution that involves using PHP's HTTP class to simulate a client's browser.
Does anyone know if the PHP HTTP class supports javascript functions? Can you recommend any others that do?
Thanks!
No, it does not. You have to implement this yourself. If you want to have it all-serverside, look into phpjs, j4p5 or better yet the spidermonkey pecl extension. http://pecl.php.net/package/spidermonkey
A better alternative might be to script a real browser yourself via an XPI plugin / XPCOM bridge. There once was an extension called "JSSh", and another "SD connector", http://www.activestate.com/blog/2008/05/jssh-replacement-sd-connector
Neither of these options is simple. That's why nobody has done it, and why such extravagant features are specifically not in the HTTP class.
An Http stream handler is not in any way related to a browser. It will not generate a DOM tree, block ads or execute javascript - it is just a library handling the http protocol.