A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: screenshot preview of external URL

  1. #1
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194

    screenshot preview of external URL

    How would you make a thumbnail screenshot preview of an external URL? I've seen this done online, but was wondering how they did it, do they literally have to load in the entire page somehow offscreen, then take a screenshot then shrink that down and display that??

    boombanguk

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Seoul, South Korea
    Posts
    1,310
    Hi there,
    This may help.
    !.....................................COMING SOON

  3. #3
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194
    thats very cool, but what I'm curious about is how the JS does that?

  4. #4
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    Just a quick scan though the Javascript code leads me to this: http://images.websnapr.com/?url=http://www.google.com You can just modify the url variable to any website and it returns a screen shot, so you can just load the images into Flash if you'd like:

    http://images.websnapr.com/?url=http://www.google.com
    http://images.websnapr.com/?url=http://www.yahoo.com
    http://images.websnapr.com/?url=http://www.msn.com
    http://images.websnapr.com/?url=http...roductions.com

  5. #5
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194
    but how does the Javascript actually do that?

  6. #6
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    the javascript is not creating the picture, its just loading the picture. the pictures are created by their servers. your best bet would be just to use websnapr and use the images they already have, and if they don't have one in their database, and its requested, itll generate it for you eventually.

  7. #7
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194
    so its not a live snapshot then? what I'm interested in is how its done on their servers? using php?

  8. #8
    say no more loydall's Avatar
    Join Date
    Feb 2001
    Location
    London
    Posts
    1,261
    PHP I'm not sure but if you wanna go the ASP.NET route I can show you how..

    But no - the example above just uses someone elses site to generate the pictures - they are probably live though as the web page it pulls the images from is probably generating the images on the fly.... hmmm.. actually, it doesn't, it queues the image generation so... it's not that good really.

  9. #9
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194
    um, well if you can tell me the general principles of how you do it with ASP.NEt that would be great, thanks.

  10. #10
    say no more loydall's Avatar
    Join Date
    Feb 2001
    Location
    London
    Posts
    1,261
    Well - what you do is create an instance of a browser (IE) on the server, point it at the website you want a thumnail of, take a screenshot, resize and save.

    You seen this: http://forums.digitalpoint.com/showthread.php?t=76454

    ?

  11. #11
    Senior Member Boombanguk's Avatar
    Join Date
    Jun 2000
    Posts
    1,194
    thanks for that, the only thing i saw though that would be of any use was HTML2JPEG, but it says it doesn't work very well and its guess work where the sub window is!

    But basically you need to have a server installed on the server?? how would you do that?

  12. #12
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    Honestly I suggest just using a service that already does it. Cached images are not bad. There's no reason to not use a cached thumbnail of a site. It is a heck of a lot easier than to write your own script for generating them when there are a bunch of companies out there that do it for you and already have a huge database of thumbnails.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center