This is my first post, not sure if I've put this in the right section but I have a bit of a head scratcher and can't for the life of me work it out...
I've got a Win NT Server with Apache 2.2 & PHP 5.2.5 installed and working on it correctly... I'm now trying to access a COM object from the PHP script but it just won't work. I've run it on my local XP Machine with the same versions of PHP and Apache and it works fine... I just can't work out the issue on the Server!
The code should just basically just open IE...
Oh, I've also set the Apache service to "interact with the Desktop" too, so I know it isn't that..
Code: Select all
<?php
// Start Sessions.
session_start();
if (isset($_GET['thumbnailurl'])){
$inputurl = $_GET['thumbnailurl'];
// Regular Expression to remove http:// from front of URL.
$url = ereg_replace("http://","",$inputurl);
//echo htmlentities($url);
grab_url($url);
}
function grab_url($graburl){
// Open IE
$browser = new COM("InternetExplorer.Application");
//$handle = $browser->HWND;
// Set IE Attributes
$browser->Visible = true;
$browser->FullScreen = true;
// Navigate to URL
$browser->Navigate($graburl);
}
?>
<!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>Untitled Document</title>
</head>
<body>
<form id="formurl" method="get" action="testgrab3.php" >
<input id="formtext" type="text" name="thumbnailurl"/>
<input id="formbuttonurl" type="submit" name="Submit" value="Grab URL"/>
</form>
</body>
</html>