Jump to content

Taking Snap Shots in PHP?


unenergizer

Recommended Posts

Are there any know tutorials about how to take snap shots of websites with php? Im not excatly sure how to describe this, but I found a perfect example. At www.whois.sc, when I searched for my domain, just out of bordom, I saw that it showed the homepage of my site (http://www.whois.sc/gamehaxs.com). I was just wondering how to do this. If you can help me find a tutorial or more reading on this, then I would GREATLY apperciate it!
Link to comment
Share on other sites

I too am amazed by the autogenerated screen shots that I've seen recently all over the web.
I know a lot them come from www.thumbshots.org

there is some good info there - and they have a free service to integrate into your site. But they dont reveal the magic.
Link to comment
Share on other sites

Humm the only thing I can think of is they invoke the php GD image libary. Then just get each pixel at a page and create an image by this built up maxtrix of pixels. I could be wayyy off here. Interested if anybody acutally knows. ;)
Link to comment
Share on other sites

[!--quoteo(post=356800:date=Mar 20 2006, 11:52 PM:name=JustinK101)--][div class=\'quotetop\']QUOTE(JustinK101 @ Mar 20 2006, 11:52 PM) [snapback]356800[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Humm the only thing I can think of is they invoke the php GD image libary. Then just get each pixel at a page and create an image by this built up maxtrix of pixels. I could be wayyy off here. Interested if anybody acutally knows. ;)
[/quote]

i can only personally think of a handful of possible ways

- manually. ok, so whilst alexa deals with millions of sites, if you've ever tried to change your contact details or related links, you'll notice that they state that the submissions get moderated and checked, etc, before going live.

- custom browser parser. so just like IE/FF takes a page and decides to stick it in a big full screen window, and cross-browser element sizes can depend on each browser, it could be possible to get the html from a page and render it in a particular way, before 'setting' it with a snapshot. i have managed to 're-parse' parts of a page before, but how they would go about doing it i do not know.

definitely an interesting one, but my bet (at least for alexa) is that the first one is more likely.
Link to comment
Share on other sites

[!--quoteo(post=356819:date=Mar 20 2006, 06:49 PM:name=DD32)--][div class=\'quotetop\']QUOTE(DD32 @ Mar 20 2006, 06:49 PM) [snapback]356819[/snapback][/div][div class=\'quotemain\'][!--quotec--]
I Think some people have modified mozilla slightly to allow them to take a snapshot of what you would see..
Mozilla would've been chozen simply because its open souce....

-=DD32=-
[/quote]

this seems the most likely i kno sum people that kno how to tweak firefox
Link to comment
Share on other sites

This process for me would have to be automated. Taking manual screenshots is not an option. I have come to realize that this may be an asp application, or could even be a cgi application aswell. However, php is not a requirement for me with my project in plan, so if anyone knows about being able to do this with any server side scripting languages, then please share. :)

Thanks
unenergizer
Link to comment
Share on other sites

[!--quoteo(post=357003:date=Mar 21 2006, 04:30 PM:name=unenergizer)--][div class=\'quotetop\']QUOTE(unenergizer @ Mar 21 2006, 04:30 PM) [snapback]357003[/snapback][/div][div class=\'quotemain\'][!--quotec--]
This process for me would have to be automated. Taking manual screenshots is not an option. I have come to realize that this may be an asp application, or could even be a cgi application aswell. However, php is not a requirement for me with my project in plan, so if anyone knows about being able to do this with any server side scripting languages, then please share. :)

Thanks
unenergizer
[/quote]


I found it its a class in php

[a href=\"http://www.phpclasses.org/browse/package/918.html\" target=\"_blank\"]http://www.phpclasses.org/browse/package/918.html[/a]
Link to comment
Share on other sites

A couple of other possibilities are here...

[a href=\"http://redux.imagemagick.org/discussion-server/viewtopic.php?t=5973&sid=10a67d3fbc01ace3312bec56b1217431\" target=\"_blank\"]http://redux.imagemagick.org/discussion-se...12bec56b1217431[/a]

Lite...
Link to comment
Share on other sites

Well, I just thought I would give some input on how you would go about doing this with PHP and GD.

You would need to get your script to parse the tables, and "redraw" everything correctly, using GD, add in images, backgrounds done by loops by figuring the sizes of the original and repeating, quite a lot of work, but could be done... probably would require a lot of power to do to.
Link to comment
Share on other sites

This seems to be beyond the scope of my programming knowledge. I really want to get started in programing php, but as of now all I have are online tutorials to read. Though I do have some experience, I just dont have enough for this. Though, can anyone reccommend a great resource that explains GD, that maybe even will provide tutorials, etc.

Thanks
unenergizer
Link to comment
Share on other sites

the best place (and this is not fobbing you off) is the php manual. if the in-depth descriptions of the individual functions don't help, then the examples and the user comments definitely will. start here: [a href=\"http://www.php.net/imagecreate\" target=\"_blank\"]http://www.php.net/imagecreate[/a]

once you get used to GD, it's really not all that hard. but as for hoping that GD will be the solution to your 'snapshot' problem, i very much doubt it. going to the trouble of parsing a webpage's code, images, etc - you may as well totally write your own browser for all the work it'll take you.

Cheers
Mark
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.