Take screen shot using PHP?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • howa

    #1

    Take screen shot using PHP?

    Hello,

    Is it possible to take a screen shot of the browser using PHP?

    Something similar to Alexa Web Site Screen Dump...

    thx

  • David Quinton

    #2
    Re: Take screen shot using PHP?

    On 20 Feb 2007 22:00:00 -0800, "howa" <howachen@gmail .comwrote:
    >Hello,
    >
    >Is it possible to take a screen shot of the browser using PHP?
    I don't think you can directly.
    But ISTR that, if you have KDE, you can dump Konqueror's screens to
    PNG etc.

    And I guess this could be "front-ended" with PHP?

    But it was a few years ago that I played, and I could be wrong...
    --
    Locate your Mobile phone: <http://www.bizorg.co.u k/news.html>
    Great gifts: <http://www.ThisBritain .com/ASOS_popup.html >

    Comment

    • Martin Mandl - m2m tech support

      #3
      Re: Take screen shot using PHP?

      On Feb 21, 8:58 am, David Quinton
      <usenet_2005D_e m...@REMOVETHIS BITbizorg.co.uk wrote:
      On 20 Feb 2007 22:00:00 -0800, "howa" <howac...@gmail .comwrote:
      >
      Hello,
      >
      Is it possible to take a screen shot of the browser using PHP?
      >
      I don't think you can directly.
      But ISTR that, if you have KDE, you can dump Konqueror's screens to
      PNG etc.
      >
      And I guess this could be "front-ended" with PHP?
      >
      But it was a few years ago that I played, and I could be wrong...
      --
      Locate your Mobile phone: <http://www.bizorg.co.u k/news.html>
      Great gifts: <http://www.ThisBritain .com/ASOS_popup.html >
      Dear Howa,

      as David said. PHP can not do it by itself. But you can use e.g.
      system() to access the print-screen functionality of your operating
      system or graphical front end - e.g. KDE.

      Good luck
      Martin


      ------------------------------------------------
      online accounting on bash bases
      Online Einnahmen-Ausgaben-Rechnung

      ------------------------------------------------
      m2m server software gmbh


      Comment

      • Willem Bogaerts

        #4
        Re: Take screen shot using PHP?

        Is it possible to take a screen shot of the browser using PHP?
        >
        Something similar to Alexa Web Site Screen Dump...
        No, but JavaScript features a root-html element. I think it is called
        DocumentElement . I use this feature to store an HTML "screenshot " along
        with annotations to my test sites.

        Best regards,
        --
        Willem Bogaerts

        Application smith
        Kratz B.V.

        Comment

        • howa

          #5
          Re: Take screen shot using PHP?

          On Feb 21, 4:42 pm, Willem Bogaerts
          <w.bogae...@kra tz.maardanzonde rditstuk.nlwrot e:
          Is it possible to take a screen shot of the browser using PHP?
          >
          Something similar to Alexa Web Site Screen Dump...
          >
          No, but JavaScript features a root-html element. I think it is called
          DocumentElement . I use this feature to store an HTML "screenshot " along
          with annotations to my test sites.
          >
          Hello, I am interested in your solution. Can you tell me more abt
          this?

          Thanks first.

          Comment

          • Gordon Burditt

            #6
            Re: Take screen shot using PHP?

            >Is it possible to take a screen shot of the browser using PHP?
            >>
            >I don't think you can directly.
            >But ISTR that, if you have KDE, you can dump Konqueror's screens to
            >PNG etc.
            >>
            >And I guess this could be "front-ended" with PHP?
            >>
            >But it was a few years ago that I played, and I could be wrong...
            >--
            >Locate your Mobile phone: <http://www.bizorg.co.u k/news.html>
            >Great gifts: <http://www.ThisBritain .com/ASOS_popup.html >
            >
            >Dear Howa,
            >
            >as David said. PHP can not do it by itself. But you can use e.g.
            >system() to access the print-screen functionality of your operating
            >system or graphical front end - e.g. KDE.
            PHP runs on the server. Any use of system() will also run on the server.
            Taking a snapshot of the screen of the server is (a) likely not what
            was wanted, (b) a significant security hole on the server, (c) even
            if you somehow could get the screen snapshot to work on the client
            machine, it's a security breach there also.


            Comment

            • Jerry Stuckle

              #7
              Re: Take screen shot using PHP?

              howa wrote:
              On Feb 21, 4:42 pm, Willem Bogaerts
              <w.bogae...@kra tz.maardanzonde rditstuk.nlwrot e:
              >>Is it possible to take a screen shot of the browser using PHP?
              >>Something similar to Alexa Web Site Screen Dump...
              >No, but JavaScript features a root-html element. I think it is called
              >DocumentElemen t. I use this feature to store an HTML "screenshot " along
              >with annotations to my test sites.
              >>
              >
              Hello, I am interested in your solution. Can you tell me more abt
              this?
              >
              Thanks first.
              >
              comp.lang.javas cript.

              --
              =============== ===
              Remove the "x" from my email address
              Jerry Stuckle
              JDS Computer Training Corp.
              jstucklex@attgl obal.net
              =============== ===

              Comment

              • Toby A Inkster

                #8
                Re: Take screen shot using PHP?

                Gordon Burditt wrote:
                PHP runs on the server. Any use of system() will also run on the server.
                Taking a snapshot of the screen of the server is (a) likely not what
                was wanted,
                Well, that's precisely the method used by services like BrowserCam.

                Linux/UNIX servers using X11 can have multiple displays. A dedicated
                display (e.g. ":1") could be set up as 1024x768 running Opera in full
                screen mode.

                Then the PHP script calls the following command with system():

                opera -remote 'openURL(http://www.example.net/)'

                waits a designated amount of time (10 seconds?) and then calls:

                import -display :1 -window root /tmp/screen-shot.jpeg

                --
                Toby A Inkster BSc (Hons) ARCS
                Contact Me ~ http://tobyinkster.co.uk/contact
                Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

                * = I'm getting there!

                Comment

                • Dikkie Dik

                  #9
                  Re: Take screen shot using PHP?

                  Hello, I am interested in your solution. Can you tell me more abt
                  this?
                  From my (test) site, I open a new window with JavaScript code. This
                  window has a simple form that allows the user to enter a remark. This
                  form also has a hidden field "ctlSnapsho t".

                  Before submitting the form, I run the following script:

                  var strContent = window.opener.d ocument.documen tElement.innerH TML;
                  document.getEle mentById('ctlSn apshot').value = strContent;

                  That's it. The HTML of the current page of the test site is submitted
                  and stored along with the comment.

                  Best regards.

                  Comment

                  Working...