URL snapshot

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
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

URL snapshot

Post by ddragas »

Hi all
Does somebody know a class to take image (jpeg) snapshot from URL written all in php and without third part software.

Thank you all

Kind regards
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: URL snapshot

Post by josh »

PHP itself is made up of 3rd party software.

I suppose you could write a DOM parser and build a look alike snapshot with GD,

or you could just make a command line call to a web browser and then read the jpeg into PHP ;-)

The thing is is a webpage is just text. Browsers render a graphical representation, the OS already has hooks in place for grabbing the screen from the browser. PHP on the other hand runs on the command line, so you you're really asking about apples and oranges here
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

Re: URL snapshot

Post by ddragas »

thank you for reply.
I understand. One more question. My client has VPS in command line linux server (Ubuntu) and there is no GUI.
How can web browser be used with this? Is it possible?
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Re: URL snapshot

Post by josh »

If you install firefox, it should have command line options for doing what you need to do, you could have PHP send the command to firefox while redirecting the snapshot output to a file then read the file from PHP, manipulate it, and do whatever
User avatar
ddragas
Forum Contributor
Posts: 445
Joined: Sun Apr 18, 2004 4:01 pm

Re: URL snapshot

Post by ddragas »

thank you for your help

kind regards
Post Reply