i have a directory running, and i was wondering if there is some way that php can create a screenshot of a given site, and dynamically produced say a 100*100px thumbnail. any ideas?
I think it would be terribly difficult to do in PHP. You first would need to develop an HTML/CSS rendering engine for PHP (I've never heard of such a thing for PHP). Which basically means you would first need to develop a browser from scratch in PHP.
haha thanks shawn, guess i won't be undertaking this one just a question though: how does alexa and thumbshots.org do it though
Why not use Alexa's thumbnail? Use PHP similar to this (Notice the part in bold): <?php echo "<img src="http://thumbnails.alexa.com/image_server.cgi?size=large&url=$siteurl">"; ?> $siteurl being the URL to the site in your directory
Some people have been successful installing a windowing system and browser on their server and using php (via shell calls) to open a website in the browser, take a screenshot, resize it and save it to a database. But even that can be an undertaking. If you're interested you can search for it people have already done it.
I found a german site that can handel the thumbs for you. www.thumbshot.de If you need a little help i can do some translating for you.
Is there a url in that site that can output the image if the url is given ? Say, thumbshot.de?url=digitalpoint.com ?
But what I get is a blank GIF image all the time. If it takes time to generate the image, then FireFox will show that its still waiting to accept data from the server - but it seems its getting a connection close.
If it's not generated so far its a blank image. Here is an example http://www.thumbshots.de/cgi-bin/show.cgi?url=http://www.thumbshots.de *edit: Look at the article, the picture is now online (took about 1,5h) http://www.labusinessjournal.org/article-2-website-thumbshots.html User-Agent: thumbshots-de-Bot (Version: 1.02, powered by www.thumbshots.de)
I'd like to use it, and I'd give credit, but it would be great if they could give a placeholder for sites they haven't indexed yet. Infact, what would be useful is if you could query them first with something like thumbshots.de/cgi-bin/available.cgi?url=digitalpoint.com and it could return a one char text string of 0 or 1 if the image was available. Then I could either request the image or not. Hopefully the request would also trigger the creation of the image so next time it will be there.
Oh...I thought it was generating the image on the fly. If it was on the fly then its worth backlinking - but backlinking for cached images - I dont think its worth.
Ahm i think on-the-fly won't be possible, the "bot" must surf to the site to and is doing a screenshot from it. And why not use cached images? Most websites don't update so often that the screen looks really different. There is one more script with that you can update every 24h. http://thumbshot.de/cgi-bin/update.cgi?url=[LINK]
hmmm. doesn't like http://thumbshot.de/cgi-bin/update.cgi?url=www.top100vbulletin.com aaah, it wants the http:// as well can I get internal pages?
Hansi, this is awesome and could be just what I'm looking for over on www.top100vbulletin.com. Do you know the guys involved? I'd like to actually retrieve the image and host it locally but refresh them monthly - so I could do that using the update request and then a day later request the thumbnail. As I've said, I'd give credit. Would that kind of use be acceptable?