Freek Van der Herten: Easily convert webpages to images using PHP

综合编程 2017-07-04 阅读原文

Freek Van der Herten
has an article posted to his site showing how you can use the Browsershot
package to convert web pages to images
with a bit of PHP.

Browsershot
is a package that can easily convert any webpage into a image. Under the hood the conversion is made possible new headless options in Chrome 59
. In this post I’d like to show you how you can use Browsershot v2.

He starts with a bit of history about the package and the recent switch from PhantomJS (a now abandoned project) over to Chrome's screenshot handling for creating the web page captures. He then shows how to install Chrome 59, the first version to include this feature, into a unix-based environment. Next comes the package
and some example code of it in use: making a simple capture, setting the window size, manipulate the image post-capture and change it to grayscale.

PHPDeveloper

责编内容by:PHPDeveloper阅读原文】。感谢您的支持!

您可能感兴趣的

PHP package in the Javascript matrix Afternoon all. The code below works perfectly, however, I need to pull each row of the php sql array out and into the script var. Any ideas on how to ...
Run if a statement if a value found in a multidime... I have a piece of code which sole purpose is to find a desired value in a multidimensional array and if a match is found execute a if statement. i ...
Display (if) link in cell The table cell in the below code is being used as part of a messaging system and it returns the url as a link to the attached file to the message. ...
The php update operation does not work I am learning CRUD in php mysqli insert and delete is working but when I tried to update any record, the new value record gets inserted to new row ins...
php发送http put/patch/delete请求Demo CURL请求对于PHPer是必备技能,使用 curl_opt 函数来发送各式各样的http请求动作,不仅限于get和post。 在测试自己的restful api的时候,通过访问这个代理发送http put/patch/delete请求的php页面,完成测试。请参考下面的...