webpage to image

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
RustyDoorknobs
Forum Newbie
Posts: 15
Joined: Mon Sep 07, 2009 4:50 pm

webpage to image

Post 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
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: webpage to image

Post 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.
RustyDoorknobs
Forum Newbie
Posts: 15
Joined: Mon Sep 07, 2009 4:50 pm

Re: webpage to image

Post 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.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: webpage to image

Post by requinix »

You'll probably be using GD for it, then.

Need a lot more information about what you're doing.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: webpage to image

Post 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)
User avatar
Mirge
Forum Contributor
Posts: 298
Joined: Thu Sep 03, 2009 11:39 pm

Re: webpage to image

Post 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/
RustyDoorknobs
Forum Newbie
Posts: 15
Joined: Mon Sep 07, 2009 4:50 pm

Re: webpage to image

Post by RustyDoorknobs »

How would I use that?
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: webpage to image

Post by superdezign »

RustyDoorknobs wrote:How would I use that?
Probably requires some reading on your part. You'll be fine. :lol:
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: webpage to image

Post 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.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: webpage to image

Post by jackpf »

Or backticks ;)
Post Reply