views:

30

answers:

1

I'm doing something stupid and trying to capture thumbnails, snapshots, images of a html webpages.

I'm doing something along the lines of:

http://stackoverflow.com/questions/443837/how-might-i-obtain-a-snapshot-or-thumbnail-of-a-web-page-using-php

DCOM + IE + PHP (imagegrabwindow; example from manual)

Everything works PERFECT until I try to capture a HTTPS website... https://mail.google.com for example.

imagegrabwindow produces a png, but it only shows the browser. the contents of the browser are black. If I log out of Google, I can capture the browser window and the contents thereof - the second I log in, the contents (not the browser frame) are black screen.

Yes, I've increased the timeout (before closing the browser window). IE has clearly loaded the page, it just refuses to render for imagegrabwindow.

I've been fighting this long enough I know it's either a permissions problem or a service needs to interact with the desktop.

Does anyone have any clue what permissions need to be set or which service needs access?

I assumed cryptographic services, but that's run as a network service and trying to change it to interact makes it shout and carry on.

This is the last piece of the puzzle, I'd really like to get it working. Thank you!

A: 

Have you found a solution to this on your own? I'm experiencing this, but it's in http windows as well as https windows on a sort of random basis. Sometimes the whole document is blanked out, sometimes parts. And on 10 grabs of the same URL, some will be blank or part blank, some will be fine.

I've tried all sorts of twiddling, but can't get 15 good captures in a row. Usually can't get 5. I'm using this from the commandline, but I tried it running via Apache 2.2 on my local WAMP dev box and it didn't fare any better.

Greg Bulmash
Eventually, after finding no help with the problem, I decided to see if I could script an existing page-capture plugin or extention. I found that Pearl Crescent Page Saver for Firefox is scriptable from the commandline.http://pearlcrescent.com/products/pagesaver/doc/#commandlineThe Basic version gives you less flexibility than their paid version, but the basic version met my needs. It may also work on non-Windows systems, but I haven't tried it.
Greg Bulmash
Greg, that's exactly what I did, as I could find no relief either.However, I chose IECapt [ http://iecapt.sourceforge.net/ ]. There's also CutyCapt [ http://cutycapt.sourceforge.net/ ] for non-Windows setups.I experimented with and liked Pearl Crescent, but didn't want the overhead of adding Firefox to every deployment.
earls
Earls, thanks for the pointer to IECapt. It provides some flexibility I could only get in the paid version of Pearl Saver and gives me half a page less instructions (setting up Pearl Crescent) in the documentation of my app. Now if The folks over at Appcelerator would issue the 1.1 version of their Titanium Desktop SDK, I could wrap it all up in a GUI and cut my documentation down to a simple quickstart guide.
Greg Bulmash