Gerben93
Gebruiker
- Lid geworden
- 28 okt 2009
- Berichten
- 15
Hallo mensen,
Ik heb een vraagje over de code "imagegrabwindow()" in php.
Het is de bedoeling dan de php code een screenshot maakt van de een site bij dit voorbeeld google en die dan in een div plaatst.
Dit is mijn code.
Nu heb ik bij link1 geprobeerd om de php code "imagegrabwindow()" te gebruiken met als resultaat:
Fatal error: Class 'COM' not found in
****/index.php on line 24
Is er iemand die mij misschien verder kan helpen.
Als zekerheid hier mijn CSS code.
Ik heb een vraagje over de code "imagegrabwindow()" in php.
Het is de bedoeling dan de php code een screenshot maakt van de een site bij dit voorbeeld google en die dan in een div plaatst.
Dit is mijn code.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>GB Hompage</title>
<link href="default.css" rel="stylesheet" type="text/css" media="screen" />
</script>
</head>
<body>
<!-- start header -->
<div id="header">
<div id="logo" />
</div>
<!-- end header -->
<!-- start page -->
<div id="linkrow1">
<div id="link1" onclick="location.href='http://www.google.nl/';" style="cursor: pointer;">
<?php
$browser = new COM("InternetExplorer.Application");
$handle = $browser->HWND;
$browser->Visible = true;
$browser->Navigate("http://www.google.nl");
/* Still working? */
while ($browser->Busy) {
com_message_pump(4000);
}
$im = imagegrabwindow($handle, 0);
$browser->Quit();
imagepng($im, "images/link1.png");
imagedestroy($im);
?>
</div>
<div id="link2" onclick="location.href='http://www.google.nl/';" style="cursor: pointer;">
<img src="images/link2.jpg" height="180" width="335" align="middle">
</div>
<div id="link3" onclick="location.href='http://www.google.nl/';" style="cursor: pointer;">
<img src="images/link3.jpg" height="180" width="335" align="middle">
</div>
</div>
<div id="linkrow2">
<div id="link4" onclick="location.href='http://www.google.nl/';" style="cursor: pointer;">
<img src="images/link4.jpg" height="180" width="335" align="middle">
</div>
<div id="link5" onclick="location.href='http://www.google.nl/';" style="cursor: pointer;">
<img src="images/link5.jpg" height="180" width="335" align="middle">
</div>
<div id="link6" onclick="location.href='http://www.google.nl/';" style="cursor: pointer;">
<img src="images/link6.jpg" height="180" width="335" align="middle">
</div>
</div>
<div style="clear: both;"> </div>
<!-- end page -->
<div id="footer">
<p class="copyright">© 2009 • Design by Gerben Wijnja</p>
</div>
</body>
</html>
Fatal error: Class 'COM' not found in
****/index.php on line 24
Is er iemand die mij misschien verder kan helpen.
Als zekerheid hier mijn CSS code.
Code:
body {
margin: 0 0 0 0px;
padding: 0px;
background-repeat: repeat-x ;
background-color: #000000;
text-align: justify;
font-family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #000000;
}
h1, h2, h3 {
margin-top: 0;
}
h1 {
font-size: 1.6em;
font-weight: normal;
}
h2 {
font-size: 1.6em;
}
h3 {
font-size: 1em;
}
a {
text-decoration: none;
color: #333333;
}
a:hover {
border-bottom: none;
}
a img {
border: none;
}
img.left {
float: left;
margin: 0 20px 0 0;
}
img.right {
float: right;
margin: 0 0 0 20px;
}
#header {
width: 960px;
margin: 0 auto;
height: 262px;
}
/* Header */
#logo {
width: 1000px;
height: 200px;
margin: 0 auto;
padding-top: 50px;
background: url(images/img07.jpg) no-repeat;
}
/* Wrapper */
#wrapper {
width: 100%;
margin: 0px;
padding: 0px;
}
/* Link */
#linkrow1 {
height:214px;
margin:0;
padding:0;
width:1100px;
}
#link1 {
height:180px;
margin:0;
padding:0;
width:335px;
float: left;
cursor: pointer;
border: 3px dotted #000000;
}
#link2 {
height:180px;
margin:0;
padding:0;
width:335px;
float: left;
cursor: pointer;
border: 3px dotted #000000;
}
#link3 {
height:180px;
margin: 0;
padding:0;
width:335px;
float: left;
cursor: pointer;
border: 3px dotted #000000;
}
#linkrow2 {
height:180px;
margin:0;
padding:0;
width:1100px;
}
#link4 {
height:180px;
margin:0;
padding:0;
width:335px;
float: left;
cursor: pointer;
border: 3px dotted #000000;
}
#link5 {
height:180px;
margin:0;
padding:0;
width:335px;
float: left;
cursor: pointer;
border: 3px dotted #000000;
}
#link6 {
height:180px;
margin: 0;
padding:0;
width:335px;
float: left;
cursor: pointer;
border: 3px dotted #000000;
}
/* Content */
#content {
float: left;
width: 460px;
margin: 0px 20px 20px 20px;
background: #FFFFFF;
}
.post {
padding-bottom: 15px;
line-height: 200%;
background: url(images/img04.jpg) repeat-x left bottom;
}
.post h1 {
font-weight: normal;
}
.title {
margin: 0;
padding: 30px 0 4px 0px;
font-size: 28px;
font-weight: normal;
}
.title a {
border-bottom: none;
color: #000000;
}
.title a:hover {
border-bottom: 1px dotted #000000;
}
.byline {
background: #676767;
margin: 10px 0px 20px 0px;
padding: 4px 10px;
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #FFFFFF;
}
.tag {
padding: 0 15px;
}
.entry {
padding: 0px 0px;
}
.links {
width: 80px;
height: 33px;
background: url(images/img05.jpg) no-repeat left top;
text-align: right;
font-weight: bold;
}
.links a {
display: block;
height: 25px;
padding-top: 8px;
padding-left: 10px;
text-align: left;
color: #5E5E5E;
}
.links a:hover {
}
/* Footer */
#footer {
width: 1000px;
height: 80px;
margin: 0 auto;
padding: 0 20px;
background: url(images/img03.gif) no-repeat center top;
}
#footer p {
margin: 0;
padding: 10px 0 0 0;
text-align: center;
text-transform: uppercase;
font-size: 10px;
font-family: Arial, Helvetica, sans-serif;
color: #737373;
}
#footer a {
color: #BDBDBD;
}
#footer .link {
}
#footer .copyright {
}