Web Page Screenshots with PHP?

后端 未结 6 858
谎友^
谎友^ 2020-12-20 22:14

I know there is not a direct way to take a screen shot of a web page with PHP. What would be the most straightforward way to accomplish this? Are there any command line tool

6条回答
  •  臣服心动
    2020-12-20 22:50

    See webkit2png for an OSX commandline program that does this.

    The page also mentions Linux alternatives.

    [edit]: wkhtml2image is the newest kid in town, and it works better then anything else i've ever used.

    [edit2]: As of 2014, PhantomJS seems to be the way to go, as it has the newest webkit version of the alternatives I know about.

    [edit3]: In 2019, Puppeteer is the way to go. Official headless chrome, always up to date.

提交回复
热议问题