How to create a thumbnail image of html content stored in a database

喜你入骨 提交于 2020-01-16 18:18:06

问题


If you were to convert this html content into a small thumbnail image , how would you do it?

P.S. I'm trying to do this to allow users on my site to browse through their posts(containing html elements (e.g. strong, i, img tag's).


回答1:


See here:

http://www.thumbalizr.com/index.php

They have a pretty decent simple API

Simple syntax to use the API: http://api.thumbalizr.com/?url=http://www.ford.de&width=250

Parameter:

Check http://api.thumbalizr.com for more details.

So you can simply have <img src='http://api.thumbalizr.com/?url=http://www.yourdomain.com&width=250' />

Also see http://www.websnapr.com/ and their implementations page




回答2:


try http://www.zubrag.com/scripts/website-thumbnail-generator.php



来源:https://stackoverflow.com/questions/4312736/how-to-create-a-thumbnail-image-of-html-content-stored-in-a-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!