Reputation: 3325
I want to experiment with creating images/thumbnails of PHP output. A place where one would use this is in a CMS with various modules, and then have a thumbnail of how the output of how each module looks. This should include images and all.
Any tips/ideas how I would go about doing this?
Upvotes: 0
Views: 301
Reputation: 10880
i believe that you want to create the thumbnail/image of the rendered html, this is not going to be easy. Cause you will need to use a 3rd party screenshot component for this. You will save the html in a temp file and pass that component the url of that file and it will take a screenshot of it and then create the image which in turn u can use in your own application.
Because the rendering would differ from browser to browser and is explicitly a browser/client feature, i dont think this can be done with pure PHP.
Upvotes: 3
Reputation: 14464
I have just implemented thumbnail system in my project, so I can give you some useful tips:
Upvotes: -1
Reputation: 5561
You need to make sure the GD library is turned on in your php.ini file.
Then have a surf through php.net on the GD library functions that cover how to manipulate images.
Good luck!
Upvotes: -1