Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cybix

macrumors 6502a
Original poster
Feb 10, 2006
993
1
Western Australia
I've got a little trick I need to perform..

I'd like to have someone enter a web address into a web form, and be able to take that web address, goto the website, take a screenshot of the site/window, thumbnail it (resize) then save the thumbnail somewhere.

All automatically.

taking the url to say a flat file isnt hard.. but perhaps an applescript or simular that takes the url, opens a window in safari (goes to that site) then finder takes a window shot/screen shot of that safari window, the OS then resizes/converts the image to a thumbnail, saves it somewhere, then that safari window closes off. And perhaps Safari stays open ready for the next request.

Unless someone can think of a better way? My servers are basically all Linux, with no X11... so i wonder if throwing a MAC into the mix might work this process....

ideas and thoughts are most welcome!

Ultimately the idea is that someone can enter a url in a web form (php), the server/process goes off and visits the site, thumbnails it, throw's it in a DB, then that website's thumbnail is available for viewing on yet another web page...

confused? heh
 

HiRez

macrumors 603
Jan 6, 2004
6,250
2,576
Western US
It sounds like it's possible. I don't have an exact method, but using Automator, here's a sample workflow I made that kinda sorta heads in that direction. Or did you actually need the Safari window to be included in the snapshot? There are some snapshot actions as well. It does use the third-party action "Download URLs As PDFs" (freeware). There are other actions for other apps that might be useful here too, such as iPhoto, Photoshop, Transmit, etc. depending on your needs. And if there's something tricky that an action can't handle, you might be able to get an AppleScript action to do it. I'm not an AppleScript expert, but a lot of people on this board are. Good luck!

Images_From_URLs.png
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.