I need to run a javascript code on server side using IE8 (the javascript works with activeX objects) But I need to run it from command line, from PHP.
So in short, I will install apache + php on 2003 Windows server, and php will use system() to execute iexplore running a page of javascript.
I would like to know if this is logically possible, as i can see a number of pitfalls:
- PHP might not be able to execute iexplore without a user logged in.
- iexplore might not run the javascript correctly to interact with ActiveX objects
- iexplore might not quit when JS finished running.
I will attepmt to make a little test case as soon as i can, but any pointers about this aproach will be apreciated.
Edit:
Now, I realise that this is a round about way of doing things (read, wrong), The goal was to make a Dymo Label printer print from a central location rather than client machines (this is where the JS is from). Dymo SDK provide several ways of interacting with their printers, but Im still looking for a way to use pure PHP. I think it might be possible to use one of their example cli binaries.