473,657 Members | 2,586 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web Page Screenshot

Hi,

Are there any ways I could get a screenshot of a web-page at a
specific address in jpeg via php script?

Regards,
Marius.

Apr 14 '07 #1
19 4577
ma*****@gmail.c om wrote:
Hi,

Are there any ways I could get a screenshot of a web-page at a
specific address in jpeg via php script?

Regards,
Marius.
Not unless you find an extension that is able to output an image based
on the requested page internally or write a script that builds an image
using gd or ImagaMagick features based on the html output.

Sh.
Apr 15 '07 #2
On Apr 15, 8:25 am, Schraalhans Keukenmeester <bitbuc...@inva lid.spamwrote:
>
Not unless you find an extension that is able to output an image based
on the requested page internally or write a script that builds an image
using gd or ImagaMagick features based on the html output.

Sh.
Yes this is what I'm hoping to find, but for the moment I haven't
found such an extension.

Apr 15 '07 #3
On 14 Apr 2007 23:44:27 -0700, "ma*****@gmail. com" <ma*****@gmail. com>
wrote:
>Yes this is what I'm hoping to find, but for the moment I haven't
found such an extension.
I think that if you use KDE desktop, then Lynx can output image files.
I'm sure I've done it on on of my Linux boxes here.
--
Locate your Mobile phone: <http://www.bizorg.co.u k/news.html>
Great gifts: <http://www.ThisBritain .com/ASOS_popup.html >
Apr 15 '07 #4
ma*****@gmail.c om wrote:
Are there any ways I could get a screenshot of a web-page at a
specific address in jpeg via php script?
If you have a dedicated server, then yes, this is possible. If not, then
the chances are you don't have the correct permissions set up to do so.

The basic technique (on a Linux server) would be to constantly run a second
X server instance as ":1", and have a browser, such as Mozilla or Opera
running full-screen on that display.

When you need a screenshot of a site, you just use PHP's system() function
to run the command which tells your browser to go to the correct web page.
Then have your PHP script wait for 10 seconds to give the browser time to
load the page up, then run ImageMagick's "import" command to take a screen
shot of display :1.

Be aware though that this can be used by evil crackers as a proxy. Say for
example, you have a script which takes screen shots of websites like this:

http://yoursite.example.com/shot.php...//example.net/

And say I'm trying to crack into example.net's site through an SQL
injection vulnerability. To exploit the vulnerability, I'd normally just
request the following web page:

http://example.net/search.php?q='; DELETE+FROM+use rs;

However, if example.net are smart, and have noticed me poking around their
web server trying to find a vulnerability, so they've blocked my IP
address. So what do I do?

http://yoursite.exampl e.com/shot.php?shot=h ttp://example.net/search.php?q='; DELETE+FROM+use rs;

And now, as far as example.net are concerned, it was *you* who hacked
their site.

So if you decide to implement such a feature, beware this security
problem. There is no "easy fix" for it, but I'd suggest things like:
respect robots.txt, disallow requests for screenshots of URLs that contain
a question mark, and log all requests (even log requests which you've
disallowed).

--
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!
Apr 15 '07 #5
ma*****@gmail.c om schreef:
Hi,

Are there any ways I could get a screenshot of a web-page at a
specific address in jpeg via php script?
Depends on the OS and webbrowser you want to use for making the
screenshot... On windows you could use http://iecap.sourceforge.net to
make 'IE-like' captures...
--
Tim Van Wassenhove <url:http://www.timvw.be/>
Apr 15 '07 #6
<comp.lang.ph p>
<Schraalhans Keukenmeester>
<Sun, 15 Apr 2007 07:25:41 +0200>
<46************ *********@news. xs4all.nl>
write a script that builds an image
using gd or ImagaMagick features based on the html output
If the end result is to be shrunk and used as a thumbnail for a links
page for example - then that would probably be quite acceptable and a
reasonable way of doing it .
Apr 15 '07 #7
On Apr 15, 9:13 pm, Krustov <m...@privacy.n etwrote:
<comp.lang.ph p>
<Schraalhans Keukenmeester>
<Sun, 15 Apr 2007 07:25:41 +0200>
<4621b755$0$334 $e4fe5...@news. xs4all.nl>
write a script that builds an image
using gd or ImagaMagick features based on the html output

If the end result is to be shrunk and used as a thumbnail for a links
page for example - then that would probably be quite acceptable and a
reasonable way of doing it .
Yes, i need this for small thumbnails related to some web pages. I
prefer a simpler solution and hope to avoid running firefox or ie on a
server and take screenshots of the screen. I need a small script to
generate a that small image of a web page to associate it with my link
in the database. Hope it can be done simpler.

Apr 15 '07 #8
<comp.lang.ph p>
<ma*****@gmail. com>
<15 Apr 2007 12:24:30 -0700>
<11************ *********@l77g2 000hsb.googlegr oups.com>
write a script that builds an image
using gd or ImagaMagick features based on the html output
If the end result is to be shrunk and used as a thumbnail for a links
page for example - then that would probably be quite acceptable and a
reasonable way of doing it .

Yes, i need this for small thumbnails related to some web pages. I
prefer a simpler solution and hope to avoid running firefox or ie on a
server and take screenshots of the screen. I need a small script to
generate a that small image of a web page to associate it with my link
in the database. Hope it can be done simpler.
How easy or hard depends on how much or how little you know about php .

Most of the regulars on here could probably write a basic script to do
the job in less than 2 hours as they would no doubt have lots of the
code already written and as such would only really need to tinker around
with it in order to get it to work .

Would write it myself if i didnt have more important things to do and as
most seasoned users on here dont write code for other people - i'd say
your up shit creek matey .
Apr 15 '07 #9
On Apr 16, 1:19 am, Krustov <m...@privacy.n etwrote:
<comp.lang.ph p>
<mare...@gmail. com>
<15 Apr 2007 12:24:30 -0700>
<1176665070.058 394.94...@l77g2 000hsb.googlegr oups.com>
write a script that builds an image
using gd or ImagaMagick features based on the html output
If the end result is to be shrunk and used as a thumbnail for a links
page for example - then that would probably be quite acceptable and a
reasonable way of doing it .
Yes, i need this for small thumbnails related to some web pages. I
prefer a simpler solution and hope to avoid running firefox or ie on a
server and take screenshots of the screen. I need a small script to
generate a that small image of a web page to associate it with my link
in the database. Hope it can be done simpler.

How easy or hard depends on how much or how little you know about php .

Most of the regulars on here could probably write a basic script to do
the job in less than 2 hours as they would no doubt have lots of the
code already written and as such would only really need to tinker around
with it in order to get it to work .

Would write it myself if i didnt have more important things to do and as
most seasoned users on here dont write code for other people - i'd say
your up shit creek matey .
I'm not asking for anyone on this forum to write my code. I hope to
find someone explain me a little about ImagaMagick or Gd and help me
understand better what i have to do. I have never worked with
ImagaMagick. Telling me that the code can be written in 2 hours won't
help me too much because as you can guess i wouldn't have posted any
question here if i could write the script.

But the real reason i have posted here is that i thought there might
be some code already written for this thing and avoid reinventing the
wheel.

So if you really want to help with some links to code already written/
tutorials ... would be just great.

Apr 16 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1557
by: Mike Mimic | last post by:
Hi! I would like to know if there is some kind of program which would make a screenshot of a web page without use of X Windows. I have a server without X Windows and I would like to have a program which would generate an image of the web page of the url it is given. Without need for the X Windows.
4
1957
by: Aaron | last post by:
can i use asp.net to capture a screen shot of a webpage? something like this? http://img.nameintel.com/Thumbnails/tn.html?domain=cnn.com Is there a script that does this? Aaron
2
1342
by: Larry D | last post by:
I have a page at https://www.ccmeonline.org/online_application.shtml the looks OK in most browsers, tho a little sloppy in Opera 8.5 but someone sent me a screenshot at https://www.ccmeonline.org/images/screenshot.bmp which shows text overtop some prices. I checked with the user and she also has XP with IE6 SP1, same resolution, text size on medium. Any ideas what is wrong? And a critique of the site would be good also. Larry
2
1151
by: Ralph Krausse | last post by:
void Page_Load(Object sender,EventArgs e) What are 'sender' and 'e' used for? I can't find examples... Ralph Krausse www.consiliumsoft.com Use the START button? Then you need CSFastRunII...
2
5448
by: Java Boy | last post by:
Is it possible to fetch a webpage and take screenshot of it like it displays in browser and then store it in jpg/gif thanks -- Geeks Home www.fahimzahid.com
5
1294
by: sck10 | last post by:
Hello, (ASP.NET 2.0) I am putting together a presentation of our website. The site use CSS. when I try to open it in Word, it renders incorrectly. Any suggestions would be appreciated. -- Thanks in advance, sck10
1
1522
by: buu | last post by:
how to grab a screenshot of a webpage using BHO? somebody knows some example?
3
1824
by: Carl Gilbert | last post by:
Hi I am looking to convert a site from HTML to ASP.NET making use of CSS. I have tried various combinations but I can not seem to get the correct combination of div and CSS tag configurations. I have uploaded a screenshot (http://www.bwbfc.com/math/regions.jpg) of how the screen will be laid out. Firstly it is all cantered in the window. I plan to create a master page which would contain the header (in blue), the footer (in yellow)...
5
2448
by: smittie31 | last post by:
I am having a problem with a border around me html page. The border does not flow thru the whole html page, it cuts off halfway. --> See http://keithborom.com/marlon-sanders CSS STYLESHEET /* CSS for Marlon Sanders site */ html, body {
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8730
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1950
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.