Create a screenshot of a website

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Create a screenshot of a website

by resea soul :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I want to be able to get a screenshot of a given website on the fly.
Can you give me any suggestions.

Thank you

RE: Create a screenshot of a website

by Andrea Giammarchi-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


What you see is what a browser engine renders for your eyes while what you can do with PHP is a snapshot of the source code.

Regards

> Date: Thu, 22 Oct 2009 09:28:15 -0400
> From: reseasoul@...
> To: php-general@...
> Subject: [PHP] Create a screenshot of a website
>
> Hi,
>
> I want to be able to get a screenshot of a given website on the fly.
> Can you give me any suggestions.
>
> Thank you
     
_________________________________________________________________
Keep your friends updated—even when you’re not signed in.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_5:092010

Re: Create a screenshot of a website

by Robert Cummings :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

resea soul wrote:
> Hi,
>
> I want to be able to get a screenshot of a given website on the fly.
> Can you give me any suggestions.

http://sourceforge.net/projects/khtml2png/

It might already be in your favourite Linux distro's repositories also.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Create a screenshot of a website

by Robert Cummings :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrea Giammarchi wrote:
> What you see is what a browser engine renders for your eyes while what you can do with PHP is a snapshot of the source code.

One should remember that PHP serves quite well both as a glue language
and as a wrapper language. There is no reason why you can't use PHP to
create a simple lib around something like khtml2png so that the
screenshot can be gathered on demand using simple PHP style function calls.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Parent Message unknown Re: Create a screenshot of a website

by Robert Cummings :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

resea soul wrote:

> Thanks,
>  
> I checked the faq of their website. They say that  I must have an an X
> session. I don't host myself my website.
> I want something that I can use only by using cpanel. What i want
> basically is allow the user to enter the url of a website. And the
> script must give him the image as output.
> Maybe the hosting company will agree to install something for me but i'm
> not sure that this tool can be integrated in php scripts. I don't see
> anything about how to do that in their website.

You will almost certainly have to use a third party service if you are
in such a limited environment. Most website screenshot engines hook into
an existing browser engine to produce the image. Rendering HTML is not a
trivial task, especially if it is to take into consideration the
numerous plugins that are fairly common on the internet (flash, java,
javascript, canvas, etc, etc).

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: Create a screenshot of a website

by Andrea Giammarchi-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Rob, I agree, but you are suggesting is khtml2png which is cool, perfect, fantastic, but it's not PHP, isn't it?

You ask me: I want a snap via PHP
I reply: well, I don't think such thing exists: a render engine entirely written in PHP and GD2

Maybe we should create one ...

Regards

> Date: Thu, 22 Oct 2009 09:40:47 -0400
> From: robert@...
> To: an_red@...
> CC: reseasoul@...; php-general@...
> Subject: Re: [PHP] Create a screenshot of a website
>
> Andrea Giammarchi wrote:
> > What you see is what a browser engine renders for your eyes while what you can do with PHP is a snapshot of the source code.
>
> One should remember that PHP serves quite well both as a glue language
> and as a wrapper language. There is no reason why you can't use PHP to
> create a simple lib around something like khtml2png so that the
> screenshot can be gathered on demand using simple PHP style function calls.
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
     
_________________________________________________________________
Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010

RE: Create a screenshot of a website

by Andrea Giammarchi-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



> > Thanks,
> >  
> > I checked the faq of their website. They say that  I must have an an X
> > session. I don't host myself my website.
> > I want something that I can use only by using cpanel. What i want
> > basically is allow the user to enter the url of a website. And the
> > script must give him the image as output.

Here we are ... you see Rob? :-)

What about an iframe if this is a user website preview?

Regards
     
_________________________________________________________________
Windows Live: Keep your friends up to date with what you do online.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_1:092010

RE: Create a screenshot of a website

by Ashley Sheridan-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2009-10-22 at 16:17 +0200, Andrea Giammarchi wrote:

> Rob, I agree, but you are suggesting is khtml2png which is cool, perfect, fantastic, but it's not PHP, isn't it?
>
> You ask me: I want a snap via PHP
> I reply: well, I don't think such thing exists: a render engine entirely written in PHP and GD2
>
> Maybe we should create one ...
>
> Regards
>
> > Date: Thu, 22 Oct 2009 09:40:47 -0400
> > From: robert@...
> > To: an_red@...
> > CC: reseasoul@...; php-general@...
> > Subject: Re: [PHP] Create a screenshot of a website
> >
> > Andrea Giammarchi wrote:
> > > What you see is what a browser engine renders for your eyes while what you can do with PHP is a snapshot of the source code.
> >
> > One should remember that PHP serves quite well both as a glue language
> > and as a wrapper language. There is no reason why you can't use PHP to
> > create a simple lib around something like khtml2png so that the
> > screenshot can be gathered on demand using simple PHP style function calls.
> >
> > Cheers,
> > Rob.
> > --
> > http://www.interjinn.com
> > Application and Templating Framework for PHP
>      
> _________________________________________________________________
> Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you.
> http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010


GD is just a library that PHP uses, in a similar way that you'd be
utilising what khtml2png can do through PHP. What you just said doesn't
make much sense.

Thanks,
Ash
http://www.ashleysheridan.co.uk



RE: Create a screenshot of a website

by Andrea Giammarchi-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



> GD is just a library that PHP uses, in a similar way that you'd be
> utilising what khtml2png can do through PHP. What you just said doesn't
> make much sense.

except I cannot find anything in both php.net and pecl websites

Regards
     
_________________________________________________________________
Windows Live Hotmail: Your friends can get your Facebook updates, right from Hotmail®.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_4:092009

Re: Create a screenshot of a website

by Robert Cummings :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrea Giammarchi wrote:

>
>>> Thanks,
>>>  
>>> I checked the faq of their website. They say that  I must have an an X
>>> session. I don't host myself my website.
>>> I want something that I can use only by using cpanel. What i want
>>> basically is allow the user to enter the url of a website. And the
>>> script must give him the image as output.
>
> Here we are ... you see Rob? :-)
>
> What about an iframe if this is a user website preview?

If you have khtml2png2 on your system then using PHP you can do the
following:

<?php

     $command =
         'khtml2png2'
        .' -b'
        .' -w 1024'
        .' --get-body'
        .' "http://www.interjinn.com"'
        .' interjinn.png';

     exec( $command );

?>

I fail to see how this is not a PHP solution. This should have been
obvious when I said PHP makes an excellent glue/wrapper language.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Create a screenshot of a website

by Robert Cummings :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrea Giammarchi wrote:

>
>>> Thanks,
>>>  
>>> I checked the faq of their website. They say that  I must have an an X
>>> session. I don't host myself my website.
>>> I want something that I can use only by using cpanel. What i want
>>> basically is allow the user to enter the url of a website. And the
>>> script must give him the image as output.
>
> Here we are ... you see Rob? :-)
>
> What about an iframe if this is a user website preview?

I see you are being rather obtuse :|

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: Create a screenshot of a website

by Jason-283 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----Original Message-----
From: resea soul [mailto:reseasoul@...]
Sent: 22 October 2009 14:28
To: php-general@...
Subject: [PHP] Create a screenshot of a website

Hi,

I want to be able to get a screenshot of a given website on the fly.
Can you give me any suggestions.

Thank you


Hi,

If a windows web server is being used, we've had very good results with the
activex control (use via COM within PHP5) from
http://www.acasystems.com/en/web-thumb-activex/

The developer is very responsive to bug reports / feature suggestions. Full
PHP example code is given for all functions as well.

HTH
J


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: Create a screenshot of a website

by Andrea Giammarchi-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



> I see you are being rather obtuse :|

I use system/shell calls without problems if there is the lib I need.
The problem here is that the question was, in my opinion, the classic: how to assign javascript var to php (directly)

Indeed he is trying to find a PHP solution, of course with third parts libraries you can do whatever you want, but this is not the case.

Good suggestion, not applicable since the question was different, so maybe I've been obtuse reading the question ... still good suggestion.

Regards
     
_________________________________________________________________
Windows Live Hotmail: Your friends can get your Facebook updates, right from Hotmail®.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_4:092009

Re: Create a screenshot of a website

by Robert Cummings :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrea Giammarchi wrote:

>
>  > I see you are being rather obtuse :|
>
> I use system/shell calls without problems if there is the lib I need.
> The problem here is that the question was, in my opinion, the classic:
> how to assign javascript var to php (directly)
>
> Indeed he is trying to find a PHP solution, of course with third parts
> libraries you can do whatever you want, but this is not the case.
>
> Good suggestion, not applicable since the question was different, so
> maybe I've been obtuse reading the question ... still good suggestion.

Given the knowledge (or extremely likely probability) of the
non-existence of a PHP only solution for generating website thumbnails
it follows that my suggestion was absolutely applicable.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: Create a screenshot of a website

by Andrea Giammarchi-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



> Given the knowledge (or extremely likely probability) of the
> non-existence of a PHP only solution for generating website thumbnails
> it follows that my suggestion was absolutely applicable.

I have never said the opposite ... I have just said: pure PHP with standard core functions/libraries? No way so far

The right question would have been: do you know any third parts library/webservice able to get a snapshot?
In this case your suggestion would have been perfect :-)

Regards
     
_________________________________________________________________
Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail you.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010

RE: Create a screenshot of a website

by Ashley Sheridan-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 2009-10-22 at 17:33 +0200, Andrea Giammarchi wrote:

>
> > Hi,
> >
> > If a windows web server is being used, we've had very good results with the
> > activex control (use via COM within PHP5) from
> > http://www.acasystems.com/en/web-thumb-activex/
> >
> > The developer is very responsive to bug reports / feature suggestions. Full
> > PHP example code is given for all functions as well.
>
> Now this is truly interesting, is there any particular reason it works only with windows web server? Any chance it could be somehow integrated via VM Virtual Images if the reason is driven Internet Explorer?
>
> Regards
>      
> _________________________________________________________________
> Windows Live Hotmail: Your friends can get your Facebook updates, right from Hotmail®.
> http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_4:092009


Surely the clue to that question would be in the activex part?...

Thanks,
Ash
http://www.ashleysheridan.co.uk



RE: Create a screenshot of a website

by Andrea Giammarchi-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



> Hi,
>
> If a windows web server is being used, we've had very good results with the
> activex control (use via COM within PHP5) from
> http://www.acasystems.com/en/web-thumb-activex/
>
> The developer is very responsive to bug reports / feature suggestions. Full
> PHP example code is given for all functions as well.

Now this is truly interesting, is there any particular reason it works only with windows web server? Any chance it could be somehow integrated via VM Virtual Images if the reason is driven Internet Explorer?

Regards
     
_________________________________________________________________
Windows Live Hotmail: Your friends can get your Facebook updates, right from Hotmail®.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_4:092009

Re: Create a screenshot of a website

by Robert Cummings :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrea Giammarchi wrote:
>
>> Given the knowledge (or extremely likely probability) of the
>> non-existence of a PHP only solution for generating website thumbnails
>> it follows that my suggestion was absolutely applicable.
>
> I have never said the opposite ... I have just said: pure PHP with standard core functions/libraries? No way so far

Yes you did, and I quote:

     "Good suggestion, not applicable since the question was different"

You said "not applicable".... which is exactly the opposite of "applicable".

> The right question would have been: do you know any third parts library/webservice able to get a snapshot?
> In this case your suggestion would have been perfect :-)

The OP's original question was:

     "I want to be able to get a screenshot of a given website on
      the fly. Can you give me any suggestions."

He wanted a route to get a screenshot. he didn't say PHP only, he didn't
say third party, he just said "any suggestions"-- take careful note of
the word "ANY".

Now, if you don't mind, please stop spamming the poster's thread with
puerile argument.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: Create a screenshot of a website

by Robert Cummings :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Andrea Giammarchi wrote:

>
>> Hi,
>>
>> If a windows web server is being used, we've had very good results with the
>> activex control (use via COM within PHP5) from
>> http://www.acasystems.com/en/web-thumb-activex/
>>
>> The developer is very responsive to bug reports / feature suggestions. Full
>> PHP example code is given for all functions as well.
>
> Now this is truly interesting, is there any particular reason it works only with windows web server? Any chance it could be somehow integrated via VM Virtual Images if the reason is driven Internet Explorer?

Of course it can work with a virtual machine... but the OP already
indicated they want something that works with cpanel so to smack you
with your own childish arguments... this is not applicable... something
that is known at this stage of the thread.

Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: Create a screenshot of a website

by Jason-283 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----Original Message-----
From: Andrea Giammarchi [mailto:an_red@...]
Sent: 22 October 2009 16:34
To: networkadmin@...; php-general@...
Subject: RE: [PHP] Create a screenshot of a website



> Hi,
>
> If a windows web server is being used, we've had very good results with
the
> activex control (use via COM within PHP5) from
> http://www.acasystems.com/en/web-thumb-activex/
>
> The developer is very responsive to bug reports / feature suggestions.
Full
> PHP example code is given for all functions as well.

Now this is truly interesting, is there any particular reason it works only
with windows web server? Any chance it could be somehow integrated via VM
Virtual Images if the reason is driven Internet Explorer?

Regards
     



That is a question you'd have to ask the developer I'm afraid. The only PHP
compatible interface is COM (which I'm pretty sure is windows only), so
you'd need to be running PHP on windows (IIRC).

J


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

< Prev | 1 - 2 | Next >