Website screenshots

前端 未结 26 3461
长发绾君心
长发绾君心 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:01

    You could do 2 things.

    Use Puppeteer

    You can use the PHP Puppeteer package to spin up a browser and take a screenshot.

    Use an API

    There are a lot of screenshot APIs. You could look at ScreenshotAPI.net for example. (Disclaimer I'm the creator of that API)

提交回复
热议问题