网站截图,服务器端,在租用的Linux服务器上,免费 [英] Taking website screenshot, server-side, on a Linux rented server, free
问题描述
好吧,现在我真的付不起任何服务的费用.我希望能够使用我租用的基于 Linux 的服务器截取屏幕截图,并将它们输出到屏幕上.
Ok so, right now I can't really afford to pay for any service. I want to be able to take screenshots using my rented server, which is Linux based, and output them on the screen.
我知道有很多服务可以这样做,但它们通常有限制或水印,或者您必须等待从队列中提取屏幕截图.
I know there are a lot of services that do this, but they usually have limits or watermarks, or you have to wait for your screenshot to be taken from the queue.
有什么办法可以自己截取屏幕截图,然后再缓存它们或其他任何东西?我正在使用 PHP,但不限于此;我只是在 Linux 服务器上,所以 GD 的相应功能不起作用.帮助!:)
Is there any way to just take the screenshots myself and maybe later cache them or anything? I'm using PHP, but I'm not limited to it; I'm just on a Linux server so GD's appropriate functions wouldn't work. Help! :)
推荐答案
if(phantom.state.length === 0){
phantom.state = '0_home';
phantom.open('http://www.mini.de');
}
else if(phantom.state === '0_home'){
phantom.viewportSize = {width: 800, height: 600};
phantom.sleep(2000);
phantom.render('home.png');
phantom.exit(0);
}
这篇关于网站截图,服务器端,在租用的Linux服务器上,免费的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!