Forum Moderators: coopster

Message Too Old, No Replies

HomePage Snapshot

Enter URL, and get homepage snapshot as an image

         

woldie

9:54 am on Dec 17, 2004 (gmt 0)

10+ Year Member



Hi,

I've got an interesting problem and I don't know how to go about doing this.

The SERPS on some search engines has the URL, description and a snapshot of the home page as an image, now I think thats done on the fly.

Basically I am trying to do the same, where by you can enter a URL and you get a snapshot of the homepage as an image.

Can this be done using PHP?

Many Thanks

Woldie :)

mincklerstraat

10:37 am on Dec 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'd need to use a special service that does this for you, as you need an HTML rendering engine to know what HTML looks like. PHP can certainly manipulate HTML for you, copy it, and sling it around, but it's got no idea of what all that pretty HTML looks like that it's working so hard on (poor PHP). Google "thumbshots" (there are free ones available) or go to dmoz.org and see what they use.

A thumbshot service will give you a standard way of determining the url of the thumbshot based on the homepage domain. You can use PHP to check to see if this image exists or not before you throw the thumbshot url into your own file or database, or copy the thumbshot (if this is permissible ).

gethan

10:59 am on Dec 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[webmasterworld.com...]

Looks like the best solution to me: the Linux mozilla (or other browser) screenshot could additionally be piped through imagemagick, and uploaded to your webserver. I imagine that Alexa et al, use something similar, hence the "coming soon" - waiting for the batch process to refresh all the images.

woldie

11:11 am on Dec 17, 2004 (gmt 0)

10+ Year Member



Thanks Mincklestraat,

I see what you mean, shame PHP hasn't that got functionality as yet, but you never know.

Do you know of any good examples out there? I'm on Apache so perhaps there is some Apache commands which can do this?

I stumbled across this site, [babysimon.co.uk...]

Thanks

:o)

mincklerstraat

11:48 am on Dec 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Wow, that looks like fun! Would probably need your own box to run it on, but wow! If you don't have a whole lot of new stuff coming in, you might even be able to script something from a share hosted server to list out new url's, get that list on your own desktop, run the script for each of the urls, and save the images back to your server.

In php, you'll probably want to use

system() [be.php.net]

woldie

12:03 pm on Dec 17, 2004 (gmt 0)

10+ Year Member



Yeah I thought of using the system command in PHP all you need to is populate the domain name to whatever you typed in from the input, and bob's your uncle!

I have a server which I work on anyway, just need to install the software on the server.

I did see this on another thread on Webmasterworld.

Cheers.

mincklerstraat

12:20 pm on Dec 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Woldie, would be interested in hearing how this goes, if it works nice I'd enjoy reading about it, when you do sticky me if I don't seem to be awake.

woldie

12:36 pm on Dec 17, 2004 (gmt 0)

10+ Year Member



Hi mincklerstraat,

Sure I will let you know, I'll more than happy to let you know.

I've not tried it as yet, but I intend to sometime today, with a bit of luck.

Thanks again for your help.

Woldie. :o)