require_once('print_rf.func.php');
function getScreen($v=false) {
$P['url'] = 'www.okis.it';
$tuCurl = curl_init();
curl_setopt($tuCurl, CURLOPT_URL, "http://www.thumbalizr.com/");
curl_setopt($tuCurl, CURLOPT_POST, true);
curl_setopt($tuCurl, CURLOPT_POSTFIELDS, $P);
ob_start();
$tuData = curl_exec($tuCurl);
$cnt = ob_get_contents();
ob_clean();
if(!curl_errno($tuCurl)){
$info = curl_getinfo($tuCurl);
#echo 'Took ' . $info['total_time'] . ' seconds to send a request to ' . $info['url'];
} else {
#echo 'Curl error: ' . curl_error($tuCurl);
}
curl_close($tuCurl);
#$tuData = file_get_contents('test.html');
preg_match_all('|1280|',$cnt,$M);
$image = $M[1][0];
print_rf($image);
$f='test.png';
file_put_contents($f,file_get_contents($image));
echo '
';
}
getScreen();
exit;
#$img = imagegrabscreen();
#imagepng($img, 'screenshot.png');
/*
function getScreen($v) {
$u = 'http://immediatenet.com/cgi-bin/render_thumbnail?user=www.okis.it&Size=1280x1024&CaptureDelay=0&Scale=100&Format=PNG';
$u = 'http://immediatenet.com/t/l?Size=1280x1024&URL=www.okis.it';
$u = 'http://wimg.ca/size_3/http://www.hotelbrixen.it/de/home.html/';
$R = file_get_contents($u);
$f = 'test.png';
file_put_contents($f,$R);
#print_rf($R);
echo '
';
}
getScreen('www.okis.it');
*/
define ("_THUMBALIZR",1);
require_once("config.inc.php"); // get config and functions
$image=new thumbalizrRequest(); // create object
#$image->request("http://www.ebay.com"); // send request
$url = array(
'http://www.stol.it',
'http://www.okis.it',
'http://www.ebay.com',
);
?>
foreach($url as $u) {
$image->request($u); // send request
if ($image->headers['Status']=="OK" || $image->headers['Status']=="LOCAL") { // if picture is available
#$image->output(); //dump binary image data
print_rf('
local_cache_file.'"/>',$u);
} else {
print_rf($image->headers); // print text result output - you can dump your own "queued" picture here
}
}