I'm trying to run a test file that opens internet explorer on my server... It runs the program, but it's always in the background (iexplore.exe runs with the correct user in taskman). I can't get it in the foreground... any ideas why this is?
My code is below:
Code: Select all
<?php
// Open IE
$browser = new COM("InternetExplorer.Application") or die("Unable to instantiate IE");;
// Set IE Attributes
$browser->Navigate("about:blank");
$browser->Visible = true;
//$browser->Fullscreen = true;
// Navigate to URL
$browser->Navigate("www.google.com");
while ($browser->Busy) {
com_message_pump(2000);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Open IE</title>
</head>
<body>
</body>
</html>