I want to create a web directory site, and I need to get these site screenshots. How to get a site screenshot quickly using PHP? I tried IECAPT,webscreencapture, khtml2png, but they are all slowly. And they all get screenshot one url by one url. 开发者_如何转开发Is IECAPT depends on a ie browser? if it is, why it can not open many ie tags so that work at the same time? Is there anyone can recommend me a PHP screenshots software using online? according to my above requirements? Thank you.
Your requirements are unrealistic. Your best bet is to integrate with WebKit through something like CutyCapt that doesn't run an actual browser, but just the WebKit rendering engine. You shouldn't have any concurrency issues, but it it isn't going to be fantastic.
These external services are developing fast. Take a look at: http://immediatenet.com/thumbnail_api.html it renders thumbnails extremely fast and caches them like the other similar services.
Probably the easiest way is to use an external service. There used to be Alexa Site Thumbnail but it has been discontinued, so you must look for alternatives. For example http://www.pageglimpse.com/ seems to be one.
I have tried CutyCapt, I copied 3 CutyCapt.exe and renamed them. But it also catch the screenshot one by one , not run the 3 processes at one time.
<?php
set_time_limit(0);
$url1 = 'http://www.google.co.uk';
$out1 = '1.jpg';
$path1 = 'CutyCapt1.exe';
$cmd1 = "$path1 -u=$url1 -o=$out1";
//exec($cmd);
system($cmd2);
$url2 = 'http://www.google.com';
$out2 = '2.jpg';
$path2 = 'CutyCapt2.exe';
$height2 = '1200 ';
$cmd2 = "$path2 -u=$url2 -o=$out2";
//exec($cmd);
system($cmd2);
$url3 = 'http://www.google.co.jp';
$out3 = '2.jpg';
$path3 = 'CutyCapt3.exe';
$height3 = '1200 ';
$cmd2 = "$path3 -u=$url3 -o=$out3";
//exec($cmd);
system($cmd3);`
?>
I do not think many thumbnail service site, like pageglimpse.com, they install many browsers on their web servers. What is the technology they use?
精彩评论