Website screenshots

前端 未结 26 3535
长发绾君心
长发绾君心 2020-11-21 06:07

Is there any way of taking a screenshot of a website in PHP, then saving it to a file?

26条回答
  •  暖寄归人
    2020-11-21 07:02

    I wrote a quick and dirty app the other day for doing this using Google API. Most certainly scope for improvement...

    • It uses the latest Google API ver 5.
    • Image size now 500px wide
    • Supports desktop & mobile view
    • Save to a file in a specified folder
    • Incorporate a rudimentary cache system

    Find it here with a live demo and code.

    I did not post the code here simply because I keep on refining it and hopefully when I have time, convert it into a proper class.

提交回复
热议问题