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

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值