开发者

In PHP, is it possible to take web page screenshots in memory?

By "in memory", I mean that the screenshot won't be written to a file.

The requirement is to generate thumbnails of a web page that will be stored in the database. I know that savi开发者_JAVA技巧ng images in the database is not recommended, but we might not have write permissions in our server, so we are exploring this option.

If it's possible, how is it done?


This would require a webpage renderer written in PHP, and as far as I know, there is no library that does this. There are however several command-line tools that can do this (CutyCapt is one example), but they will write to a file.

As regards write permissions, you might be able to write to /tmp and then do a pass-through via PHP.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜