Website screenshots

前端 未结 26 3429
长发绾君心
长发绾君心 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 06:49

    I'm on Windows so I was able to use the imagegrabwindow function after reading the tip on here from stephan. I added in cropping (to get rid of the Browser header, scroll bars, etc.) and resizing to get a final image. Here's my code. Hope that helps someone.

提交回复
热议问题