Home > Backend Development > PHP Tutorial > php远程对域名页面截图 响应时间太长怎么解决

php远程对域名页面截图 响应时间太长怎么解决

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-23 14:20:02
Original
1407 people have browsed it

php 域名 function server

<?php function jietu($url,$savepath){//网页截图		if(empty($savepath))			{			exit('截图保存目录为空或者不是目录!');			}		else			{			if(!file_exists($savepath))//如果截图目录不存在则新建				{				mkdir($savepath);				}			}		if(!url_exists($url))			{			exit('URL地址不存在!');			}		$filename=rtrim($savepath,'/').'/'.time().'.png';//拼装生成截图的文件名		$rutycapt=dirname($_SERVER['SCRIPT_FILENAME']).'/IECapt.exe';//你本机IECapt的路径		$cmd="$rutycapt --url=$url --out=$filename";//拼装截图命令		system($cmd);//执行命令		//echo $cmd;	}	function url_exists($url){ //判断URL地址是否存在		$head=@get_headers($url);		if(is_array($head))			{			return true;			}		else			{			return false;			}	}	jietu('http://www.baidu.com','./img');//url地址不能省略www,省略之后截图为空白?> 
Copy after login


这是代码  我加载的时候  响应时间 都一分钟了  怎么可以解决响应时间长的问题

回复讨论(解决方案)

iecapt的??,你搜一下看看有?有更好的截?工具

还有没有别的呢

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template