Jump to content

Website Screenshots


White_Lily

Recommended Posts

Hi, I was wondering if it is possible to have a script locates a website that has been entered by a user, takes a screenshot of it, saves it as a .jpg in a specified directory and then outputs that screenshot to the user?

 

If this is possible could anyone maybe give me some links to sites that could help? I have searched the internet to very little success.

 

Thanks - Lily

Link to comment
Share on other sites

Okay. All i want to do is write a script that takes a screenshot of the website url that is entered by a user and that screenshot being saved to a directory and output to the user if the save was successful, thats all I want to do, i don't want to go through some other external site. I want to be able to write the script for it myself.

Link to comment
Share on other sites

Okay. All i want to do is write a script that takes a screenshot of the website url that is entered by a user and that screenshot being saved to a directory and output to the user if the save was successful, thats all I want to do, i don't want to go through some other external site. I want to be able to write the script for it myself.

 

Just to be 100% clear, you would like somebody else to write the script for you. If you were going to write it yourself you would have already.

Edited by mrMarcus
Link to comment
Share on other sites

Okay. All i want to do is write a script that takes a screenshot of the website url that is entered by a user and that screenshot being saved to a directory and output to the user if the save was successful, thats all I want to do, i don't want to go through some other external site. I want to be able to write the script for it myself.

 

Yes it can be done. But, the issue is how long will it take (months, possible years based upon your skill-set) and the quality of the solution. These solutions (at least the ones I've worked with) don't actually take a "screenshot". They work by passing the raw HTML source code (including stylesheets) to an internal parsing engine that draws an image representing how the HTML page would be displayed in a browser. As you may know, the same page does not necessarily look the same in all browsers. So any solution is only going to be as good as the parsng and drawing logic. If you really want to build your own HTML parsing logic - go for it.

Link to comment
Share on other sites

No, as i said at the beginning and end of my last post I want to write the script MYSELF not have someone else to write it for me, because then i would have to pay them, and i dont feel like being that generous. so in actual fact you are 0% clear. All I wanted to know was 1) is it possible (to which you replied yes and said it is not easy) 2) How would i go about it? Thats all I would have needed to know.

 

EDIT: Psycho, I'm not to bothered how long really, it's more of a personal project rather than a client thing. But my boss said that it could be added to our list of functionalities if I could get it working.

Edited by White_Lily
Link to comment
Share on other sites

No, as i said at the beginning and end of my last post I want to write the script MYSELF not have someone else to write it for me, because then i would have to pay them, and i dont feel like being that generous. so in actual fact you are 0% clear. All I wanted to know was 1) is it possible (to which you replied yes and said it is not easy) 2) How would i go about it? Thats all I would have needed to know.

 

There are many ways to go about it. One of which I posted: html2canvas

Link to comment
Share on other sites

EDIT: Psycho, I'm not to bothered how long really, it's more of a personal project rather than a client thing. But my boss said that it could be added to our list of functionalities if I could get it working.

 

Not to be demeaning, but that is ridiculous. Is your company's business based on taking "screenshots" of websites? If no, why would you go through the expense of creating such a thing when you can buy a solution for less than it would cost to build one? Plus, with a solution you buy there are many other people using the solution. So bugs are found quicker and the company providing the solution has a vested interest in updating and maintaining the solution.

 

The bottom line is that it will not be cost effective for you to build your own solution and I will guarantee it will have bugs because of the sheer complexity you would encounter in web pages.

 

But, if your company thinks it is worthwhile, sure, what the heck. Job security, right.

Edited by Psycho
Link to comment
Share on other sites

Psycho mate, I have to disagree here. I think White_Lily was just saying he wanted to create something like this, and if it came to anything, way hey his boss will use -- White_Lily I would not agree to that, I would bill him for all the hours you spent putting it together. This is a solved problem though. There's plenty of solutions out there to generate relatively high-quality images based on the webkit engine or other libraries, in a variety of languages.

Link to comment
Share on other sites

I made the exact thing you are looking for and did lots of experimenting along the way.

http://dynaindex.com/snapshot.php

 

Take a look at these 2 posts for what I suggested in the past and links to information about it.

 

http://forums.phpfreaks.com/topic/261536-screenshot-software-for-windows-your-recs/?do=findComment&comment=1340333

 

http://www.phpfreaks.com/forums/index.php?topic=352033.msg1662293#msg1662293

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.