开发者

Get website image from google via php

I'm working on a website for a specific client. And he wants to be able to add link to the website, and on mouse hover to have a image of that website appear. Now, he doesen't want to take an image of the website, he only wants to input the link and have the website do everything else.

So my question is ->

Is there a way (eg. goog开发者_如何学运维le API) to get a website image only by providing the url via php? Sort of like in google, when you hover over a lik of a page, a tooltip pops up to the right with an image. Any help is, as always, appriciated :)


Here is a list of 10 free thumbnail services

http://www.webresourcesdepot.com/10-free-website-thumbnail-generation-services/

You can simply refer to the URLs of these services, e.g.

<img src="http://SnapCasa.com/Get.aspx?code=[code]&size=[size]&url=[url]" />

or make a CURL call from one of your PHP scripts and temporarily store/permanently save the image that was generated.


Have recently developed Thumbnailspro.com. It is currently free to use while in beta testing as we work out the bugs, but so far its getting quite popular, you can request thumbnails directly from your website using the code below :

http://thumbnailspro.com/thumb/http://msn.com&s=150

s=Size, size can be anywhere from 10 to 1000 pixels just add s=300 to display a thumbnail 300 pixels in width. We are trying to add more options as we go for thumbnail requests and at the same time trying to keep it as simple as possible so you don't have to enter something like the code below to get your thumbnails :

http://somethumbnailsite.com/viewurl.php?url=http://msn.com&x=200&y=300&bwidth=1024&bheight=768&rotate=76&what_the_hell%20_is_all_this_crap!

So is much more effecient!

Like the service or have any bugs contact us at admin@thumbnailspro.com!


No. The only way to do this is to request the HTML for the page, render the page and then create a thumbnail from that page render. Google does this because in the process of spidering the web, they already get all that data, and they've got a nice optimized rendering engine (Chrome) that they can put the data through, and then they've got tons of online storage space to store the cached image. There's a lot of work there, though.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜