running Javascript through IE via PHP -


i need run javascript code on server side using ie8 (the javascript works activex objects) need run command line, php.

so in short, install apache + php on 2003 windows server, , php use system() execute iexplore running page of javascript.

i know if logically possible, can see number of pitfalls:

  1. php might not able execute iexplore without user logged in.
  2. iexplore might not run javascript correctly interact activex objects
  3. iexplore might not quit when js finished running.

i attepmt make little test case can, pointers aproach apreciated.

edit:

now, realise round way of doing things (read, wrong), goal make dymo label printer print central location rather client machines (this js from). dymo sdk provide several ways of interacting printers, im still looking way use pure php. think might possible use 1 of example cli binaries.

does dymo have way of interacting command line? if can send commands via shell_exec(). http://www.php.net/manual/en/function.shell-exec.php

this easiest option when able control via command-line. need bit more control, (interactive command-line programs, instance) , program want run isn't command-line based. in these cases may need proc_open() (http://www.php.net/manual/en/function.proc-open.php) or exec() (http://www.php.net/manual/en/function.exec.php)

just make sure if use exec() redirect output!!. failure can cause program hang indefinitely.

from php manual:

note:

if program started function, in order continue running in background, output of program must redirected file or output stream. failing cause php hang until execution of program ends.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -