Is there a way to automatically take a screenshot of a website through a URL?

前端 未结 4 1788
暖寄归人
暖寄归人 2021-01-02 17:48

I am trying to find a PHP script (or a script in a different language) that after passing a URL, it takes a screenshot of the website for that URL. So for example if I pass

4条回答
  •  忘掉有多难
    2021-01-02 18:29

    Start a Browser (like system("firefox [url]")), run a screengrabber for that window and save the image somewhere.

    Since the output is always depending on the render engine used it is not possible by using php alone.

    Other option would be to embed a rendering engine (Gecko or similar) into your php script.

提交回复
热议问题