PHP cannot do this on its own because it does not include an HTML rendering library.
You can find an external method for capturing screenshots and exchange data with this method using PHP.
First you need a system designed for screenshots. Look at IECapt (http://iecapt.sourceforge.net/), CutyCapt (http://cutycapt.sourceforge.net/) or khtml2png (http://khtml2png.sourceforge.net/) and configure one of them on the system .
PHP script, exec() , , .
:
<?php
$in_url = 'http://' . $_REQUEST['url'];
$filename = '/var/cutycapt/images/' . $_REQUEST['url'] . '.png';
if(!file_exists($filename)) {
exec('/usr/local/bin/CutyCapt --url="' . $_REQUEST['url'] . '" --out="' . $filename . '"');
}
if(file_exists($filename)) {
header('Content-type: image/png');
print file_get_contents($filename);
} else {
header('Status: 500 Internal Server Error');
}
?>
script :
http:
, - (.. , - ), , .