Page 1 of 1

webpage to image

Posted: Sat Sep 12, 2009 4:28 pm
by RustyDoorknobs
Hey guys,

i have a php page that uses some url variables and stuff.
i have it so you can embed this page as an iframe in a website,
but i also want people to be able to embed it in a forum,
so is there a way to convert a webpage to a .gif file? Like, a screenshot?
I really don't want to use the GD library too much, so help me out you gooses!

Sincerely,
Rusty Doorknobs

Re: webpage to image

Posted: Sat Sep 12, 2009 4:42 pm
by requinix
An image is static. It's a picture. You can't do anything with it but look at it.

Converting a website to an image doesn't make sense.

Re: webpage to image

Posted: Sat Sep 12, 2009 4:47 pm
by RustyDoorknobs
Its not so much a website as it is a piece of dynamic content, 250by150 pixels. I want people to be able to embed it in forums as an image.

Re: webpage to image

Posted: Sat Sep 12, 2009 5:02 pm
by requinix
You'll probably be using GD for it, then.

Need a lot more information about what you're doing.

Re: webpage to image

Posted: Sat Sep 12, 2009 9:16 pm
by John Cartwright
This is a pretty complicated feature to implement, and is not possible with PHP+GD. I would suggest looking into a service such as http://www.thumbshots.org/ (which appears free)

Re: webpage to image

Posted: Sat Sep 12, 2009 11:07 pm
by Mirge
RustyDoorknobs wrote:Hey guys,

i have a php page that uses some url variables and stuff.
i have it so you can embed this page as an iframe in a website,
but i also want people to be able to embed it in a forum,
so is there a way to convert a webpage to a .gif file? Like, a screenshot?
I really don't want to use the GD library too much, so help me out you gooses!

Sincerely,
Rusty Doorknobs
You might take a look at the command-line tool available at: http://khtml2png.sourceforge.net/

Re: webpage to image

Posted: Sun Sep 13, 2009 8:54 am
by RustyDoorknobs
How would I use that?

Re: webpage to image

Posted: Sun Sep 13, 2009 10:45 am
by superdezign
RustyDoorknobs wrote:How would I use that?
Probably requires some reading on your part. You'll be fine. :lol:

Re: webpage to image

Posted: Sun Sep 13, 2009 11:52 am
by John Cartwright
You can use exec() to call command line, however like superdesignz suggests, you'll need to read the documents to implement it.

Re: webpage to image

Posted: Sun Sep 13, 2009 12:07 pm
by jackpf
Or backticks ;)