Website screenshots

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

    You can use simple headless browser like PhantomJS to grab the page.

    Also you can use PhantomJS with PHP.

    Check out this little php script that do this. Take a look here https://github.com/microweber/screen

    And here is the API- http://screen.microweber.com/shot.php?url=https://stackoverflow.com/questions/757675/website-screenshots-using-php

提交回复
热议问题