How can I take a print screen of the site by php

Discussion in 'PHP' started by hazemali, Jun 26, 2007.

  1. #1
    Hello boyes

    I have a one question

    How can I take a print screen of the site by php ? :confused:

    thank you
     
    hazemali, Jun 26, 2007 IP
  2. SeLfkiLL

    SeLfkiLL Active Member

    Messages:
    85
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    50
    #2
    You can't, unless you want to save the actual output of your site that's sent to the user. For this, you can use output buffering: http://us2.php.net/manual/en/ref.outcontrol.php

    Keep in mind that PHP is executed on the server-side, before data is sent to a browser. There are no libraries for turning HTML output into displayable format to take a "screen capture" of, since that would be kind of pointless.
     
    SeLfkiLL, Jun 26, 2007 IP
  3. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #3
    That's not exactly true... there is (apparently) a PHP extension (as in a compiled library) out there that does this, though I can't remember the name of it.

    There's got to be at least a dozen threads here that have asked the same question: do some decent searching and they'll show up.
     
    TwistMyArm, Jun 26, 2007 IP