Using PHP to take screenshots from an HTML source

I have an idea for a site that will generate png or jpeg screenshots of web pages on the fly. The end user will never see the page, but instead, the HTML will be turned into a screenshot, and the end user will see this screenshot.

How can I start with this? I assume I'm looking for some PHP function that takes HTML as an argument and then creates an image file in a specific place.

+5
source share
2 answers

As far as I know, PHP does not.

However, you can find a solution using external tools. This is how I do it.

  • Generate html
  • HTML- exec. , .
+1

All Articles