Capturing web sites!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
farsinuke
Forum Newbie
Posts: 1
Joined: Fri Jun 20, 2003 7:49 pm

Capturing web sites!

Post by farsinuke »

Some search engines capture the first (and some) page as screen shot.
For instance you could take a look at here
http://search.msn.com/preview.aspx?&q=devnetwork

I'd like to know how could I write a script w/ PHP to capture web pages as a picture?

Thanks for your help :wink:
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

I don't have a complete answer, but here's some places to look.

First use google to search for "screen scraping", typically speaking the search hits will describe text only captures, not graphics/screen shots, but somewhere there might be a good link or two. Also search for "window capture".

Second. I can think of a possible automated approach being something like
1) use system/exec calls to launch a browser passing in the target site
2) use system/exec to launch the window capture program, pasing in a reference to the newly spawned broswer, with the output of the capture saved to a specified file

There's lots of holes to fill-in, but this should get you started....
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Topic moved to PHP - Normal. Please read forum descriptions before posting.

Mac
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Post Reply