IF anyone knows or has a script that takes screenshots of a website let us know 🙂

    It shouldn't be that hard to make one, but it would require a lot of work. I doubt you're going to find one for free.

      thanks my friend

      i know it's easy but i have to know how it's work ??

        This is impossible with PHP alone. PHP is server side. The web browser ( HTML page ) is CLIENT SIDE.

        You'd need Java or Javascript ( not even sure if Javascript could do this... ) or something else client side.

        Either that or build an entire web browser sorta script with PHP. Nightmare.

          Originally posted by superwormy
          This is impossible with PHP alone. PHP is server side. The web browser ( HTML page ) is CLIENT SIDE.

          Uh.. why would that be impossible? There can be HTML pages on the server, too.

          And yes, it would be like making a browser out of PHP.

            You can run Mozilla server side (along with a ton of other browsers).

            I'm sure if you just think about it, you could probably open up mozilla, feed it a URL, and do a screen capture.

            I'm not too into Linux on the desktop, but I could probably bang it out in OSX within a day.

            I really doubt you'll be using PHP for the task though, unless you're up for writing a parser/rendering engine in PHP, which would be a monumental undertaking. Maybe for doing a sys call to get things going, but that's about it.

              Originally posted by driverdave
              I really doubt you'll be using PHP for the task though, unless you're up for writing a parser/rendering engine in PHP, which would be a monumental undertaking.

              Yep, that's exactly why I've already begun... 😉

                i have been asking this for past 9 months... no one knows... in fact some know we could use gecko engine but no one writes such a script we could call from PHP!!!!

                if you find it, send it over, i badly need it too!

                  There is almost no way you're going to do this in PHP alone.

                  You're best bet would be to install a web browser locally, and have PHP execute shell commands to open the web browser and take a screen shot.

                  Another thought would be Java, client-side Java Applets would be much more capable of doing this.

                  The only way you could do this with PHP is to write your own web browser in PHP, probably using the PHP-GTK stuff.

                    we already know this cannot be done in php alone, not at the moment.

                    You're best bet would be to install a web browser locally, and >>>have PHP execute shell commands to open the web browser >>>and take a screen shot.

                    yea i know the theory but can someone try it and give us a solution?

                      Um... its not my project, why don't you try it out and find out if it works? I can't do everything for you, what fun would that be? :-)

                        7 days later

                        I've got a working version right now, I'm working on tables right now. I'm also doing other projects, so things aren't going so fast. Right now, it handles <font>, <b>, <img>, <br>, <body> and the parameters sent with these.

                          a month later

                          Mordecai 😕
                          are you killed in IRAQ ?

                            Umm... no. I haven't worked on that much, as I was side tracked. 🙂

                            I can put the code up so far if you want to see it, but tables are kinda only half-way done. If that, even.

                              Please do post what4ever you have, I'd be interested in seeing it...

                                Originally posted by Mordecai
                                Umm... no. I haven't worked on that much, as I was side tracked. 🙂

                                I can put the code up so far if you want to see it, but tables are kinda only half-way done. If that, even.

                                Yeah, that would be cool to see too!

                                  • [deleted]

                                  Are you trying to emulate the service offered at NetMechanic ?

                                    I'm not, I'm just doing it to see how far I can actually go. I went fairly far before I got bored, though. 🙂

                                    html2img
                                    Please read the notes, and don't steal the code. You can use it if you need, but don't just rip it entirely.

                                      2 months later

                                      Any plans to keep going on this ?

                                      or anyone know of an alternative ?

                                      Id also like a php tool that allows me to capture / make web page screenshots...

                                      Even if it is simply php calling a command line app.

                                        No, I haven't worked on it in months...
                                        It's almost operational, it's just not all that effective.