Jump to content

COM object in background.


lonetraceur

Recommended Posts

Hi everyone,

 

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:

<?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>

 

Many Thanks!

Link to comment
https://forums.phpfreaks.com/topic/102495-com-object-in-background/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.