当前位置: 首页 > 工具软件 > IECapt > 使用案例 >

java iecapt.exe_IECapt生成网页快照IECapt.exe下载 CutyCapt

黄浩涆
2023-12-01

IECapt生成网页快照帮助如下:

C:\>IECapt.exe help  -----------------------------------------------------------------------------  Usage: IECapt --url=http://www.example.org/ --out=localfile.png  -----------------------------------------------------------------------------   --help                      Print this help page and exit   --url=                 The URL to capture (http:...|file:...|...)   --out=                The target file (.png|bmp|jpeg|emf|...)   --min-width=           Minimal width for the image (default: 800)   --max-wait=             Don't wait more than (default: 90000, inf: 0)   --delay=                Wait after loading (e.g. for Flash; default: 0)   --silent                    Whether to surpress some dialogs

----------------------------------------------------------------------------

CutyCapt下载地址:http://sourceforge.net/projects/cutycapt/files/cutycapt/

windows CutyCapt不需要安装,直接保存到你的电脑中即可。

然后你php代码如下写

代码如下

复制代码

/*

网页截图功能,必须安装IE+CutyCapt

url:要截图的网页

out:图片保存路径

path:CutyCapt路径

cmd:CutyCapt执行命令

比如:http://你php路径.php?url=http://www.php100.com

*/

$url=$_GET["url"];

$imgname=str_replace('http://','',$url);

$imgname=str_replace('https://','',$imgname);

$imgname=str_replace('.','-',$imgname);

$out = 'D:/webroot/test/'.$imgname.'.png';

$path = 'D:/webserver/CutyCapt.exe';

$cmd = "$path --url=$url --out=$out";

echo $cmd;

system($cmd);

?>

如果你是linux系统就需要简单的配置一下CutyCapt

 类似资料: