Chcialbym rzucic wam na pozarcie skrypt do obslugi malego programiku
http://www.websitescreenshots.com/.
Jak nazwa wskazuje screenshot strony.
Kto ma serwer na windowsie moze to sprawdzic. Program mozna pobrac ze strony powyzej.
Sam skrypt jest bardzo prosty.
Co moge dodac to parametr download 0 badz 1. Poprostu albo mozemy wyswietlic obrazek
albo wymusic sciaganie.
<?php
/**
* WebShoot php Executor
*
* @author Marek `100procent` Serafin
* @version 1.0.0
*/
$mimes = array("jpg" => "image/jpeg", "jpeg" => "image/jpeg",
"jpe" => "image/jpeg",
"gif" => "image/gif",
"png" => "image/png",
"bmp" => "image/bmp");
if(!isset($_GET['bwidth'])) $_GET['bwidth'] = '1024'; if(!isset($_GET['bheight'])) $_GET['bheight'] = '768'; if(!isset($_GET['width'])) $_GET['width'] = '800'; if(!isset($_GET['height'])) $_GET['height'] = '600'; if(!isset($_GET['encoder'])) $_GET['encoder'] = 'png'; if(!isset($_GET['quality'])) $_GET['quality'] = '100'; if(!isset($_GET['download'])) $_GET['download'] = 0;
if(!isset($_GET['out'])) $_GET['out'] = md5(date("U")) . '.' . $_GET['encoder'];
exec("webshotcmd.exe /url ".$_GET['url']." /bwidth ".$_GET['bwidth']." /bheight ".$_GET['bheight']." /width ".$_GET['width']." /height ".$_GET['height']." /out ".$_GET['out']." /encoder ".$_GET['encoder']." /quality ".$_GET['quality']." ");
if($_GET['download'] == 0){
if (isset($headers['If-Modified-Since']) && (strtotime($headers['If-Modified-Since']) == filemtime($_GET['out']))) { }else{
}
header('Content-Type: ' . $mimes[$_GET['encoder']]); header("Cache-Control: public, must-revalidate"); }elseif($_GET['download'] == 1){
header("Content-Type: " . $mimes[$_GET['encoder']]); header('Content-Disposition: attachment; filename="' . basename($_GET['out']) . '"'); header("Content-Transfer-Encoding: binaryn");
}
}else{
echo '<b>Error ::</b> Wrong encoder !'; }
}else{
echo '<b>Error ::</b> Please put url !'; }
?>