Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: Screen Capture

  1. #1
    Regular Coder
    Join Date
    Apr 2007
    Posts
    144
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Screen Capture

    i want to do a screen capture/scrape of a page, resulting in a JPG or PNG that i could save in a dir of my choice. This capture needs to take place a few seconds after the page loads, to allow all JavaScript and Flash elements on page to load.

    It would be great if i could also/just target a specific JS or Flash element to grab, instead of the whole page. There has to be some great PHP solutions for this.

    Thanks, Cesar

  • #2
    Senior Coder
    Join Date
    Apr 2007
    Location
    Quakertown PA USA
    Posts
    1,028
    Thanks
    1
    Thanked 125 Times in 123 Posts
    Well, php is a server-side language, meaning that all processing takes place on the server before the page is ever sent to the browser. Therefore, php cannot wait a few seconds after the page has loaded to perform any functions.

  • #3
    Regular Coder
    Join Date
    Apr 2007
    Posts
    144
    Thanks
    5
    Thanked 0 Times in 0 Posts
    there has to be some type of server-side scripts and modules that can render a page server-side.

    sitevista.com does it... why cant I?

    i have to be able to load a page in the background. possibly load it into cache first. HTML to PDF conversion scripts do it... sorta somewhat.

  • #4
    New Coder
    Join Date
    Aug 2007
    Location
    Wagga, Australia
    Posts
    59
    Thanks
    0
    Thanked 1 Time in 1 Post
    why don't you make the php script and run an ajax function on a page when it loads that goes to that script and takes a screenshot and saves the image??

  • #5
    Regular Coder
    Join Date
    Apr 2007
    Posts
    144
    Thanks
    5
    Thanked 0 Times in 0 Posts
    screen shot using what program or scripts. PHP has only windows screen capture.

  • #6
    New Coder
    Join Date
    Aug 2007
    Location
    Wagga, Australia
    Posts
    59
    Thanks
    0
    Thanked 1 Time in 1 Post
    PHP Code:
    <?php
    $im 
    imagegrabscreen();
    imagepng($im"myscreenshot.png");
    ?>
    that works but only in windows and with a special handler, no doubt you can do it in javascript or if you know java it might, but I haven't used java before so i don't know.

    have a look at this site, it looks like u need to use javascript and java
    http://www.itjungle.com/mpo/mpo062002-story01.html
    Last edited by usik; 08-10-2007 at 10:23 AM.

  • #7
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    I was totally unaware of that function, I asked the same question a few years ago. Have a look at this thread.
    URL Snapshot
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •