473,246 Members | 1,430 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,246 software developers and data experts.

Website picture from PHP

Hi

does anyone of you know a save method on PHP to relyably, maybe using other
programs create scrennshots (thumbnails) of websites?

I am the administrator of the open source project (at SourceForge) "TSEP -
The Search Engine Project" (http://tsep.sf.net) and we might want to show
pictures of the website our search engine has found. The generation process
of the thumbnails should be pretty automatic (as much as possible)

My tries to find an "optimal" solution did not bring any good results yet,
so I am hopeing for better information here.

Olaf

--
http://www.team-noehring.de
Jul 17 '05 #1
22 2298
As PHP is a server side programming language it is impossible to make
screenshots of the client screen with it! Sorry, but i guess you have to
take the screenshots on your own. ;-)

--
You don't need a reason to help people!
Jul 17 '05 #2
Hi Mathias
As PHP is a server side programming language it is impossible to make
screenshots of the client screen with it! Sorry, but i guess you have to
take the screenshots on your own. ;-)


I know that.
I have found solutions where the php script does the following:
1. start new instance of webbrowser with desired URL
2. start screencapture program (i.e. irfanview). capture most front window
(browser with URL)
3. resize picture, save in specific place (i.e. c:\)
4. upload picture using php upload feature.

User needs in my example irfanview which might not be available

Olaf

--
---
http://www.team-noehring.de
Jul 17 '05 #3
Olaf Noehring wrote:
Hi

does anyone of you know a save method on PHP to relyably, maybe using other
programs create scrennshots (thumbnails) of websites?

I am the administrator of the open source project (at SourceForge) "TSEP -
The Search Engine Project" (http://tsep.sf.net) and we might want to show
pictures of the website our search engine has found. The generation process
of the thumbnails should be pretty automatic (as much as possible)

My tries to find an "optimal" solution did not bring any good results yet,
so I am hopeing for better information here.

Olaf


I guess that including a stripped-down version of the gecko rendering
engine is overkill for your project, but anyways, I believe it is
capable of rendering output to a file (at least in print mode it can!).

Jul 17 '05 #4
On Sun, 23 Jan 2005 17:59:03 +0100, Olaf Noehring wrote:
does anyone of you know a save method on PHP to relyably, maybe using
other programs create scrennshots (thumbnails) of websites?


You need something like http://www.danvine.com/icapture/ has; maybe you
can use their (or similar) external service?
--
Firefox Web Browser - Rediscover the web - http://getffox.com/
Thunderbird E-mail and Newsgroups - http://gettbird.com/
Jul 17 '05 #5
Hi Dani
I guess that including a stripped-down version of the gecko rendering
engine is overkill for your project, but anyways, I believe it is
capable of rendering output to a file (at least in print mode it
can!).


Can you post an URL please. I do not know "gecko"

Thanks Olaf
--
---
http://www.team-noehring.de
Jul 17 '05 #6
Hi Ewoud
does anyone of you know a save method on PHP to relyably, maybe using
other programs create scrennshots (thumbnails) of websites?


You need something like http://www.danvine.com/icapture/ has; maybe you
can use their (or similar) external service?


Yes, simliar to this. Even more similar to thumbshots.org. I would also
include a script if that makes things more easy (i.e. for windows scripting
host to do some work).

I see the "problem", that it could take very long to make screenshots the
way I described before:

1. start new instance of webbrowser with desired URL
2. start screencapture program (i.e. irfanview). capture most front window
(browser with URL)
3. resize picture, save in specific place (i.e. c:\)
4. upload picture using php upload feature.
Olaf
--
http://www.team-noehring.de
Jul 17 '05 #7
Olaf Noehring wrote:
Hi Dani

I guess that including a stripped-down version of the gecko rendering
engine is overkill for your project, but anyways, I believe it is
capable of rendering output to a file (at least in print mode it
can!).

Can you post an URL please. I do not know "gecko"


It's the rendering engine used by Mozilla Suite, Firefox, Thunderbird,
etc... Its real name is NGLayout, not Gecko (my fault).

This document explains how to plug it into your code:

http://www.mozilla.org/projects/embe...ingBasics.html
DISCLAIMER: I haven't done this, and I don't even know if it is really
feasible. I just happened to have the idea.
Jul 17 '05 #8
Hi Dani
I guess that including a stripped-down version of the gecko rendering
engine is overkill for your project, but anyways, I believe it is
capable of rendering output to a file (at least in print mode it
can!).
Can you post an URL please. I do not know "gecko"
It's the rendering engine used by Mozilla Suite, Firefox, Thunderbird,
etc... Its real name is NGLayout, not Gecko (my fault).

This document explains how to plug it into your code:

http://www.mozilla.org/projects/embe...mbeddingBasics
.html


Thanks fpor the URL. - It's very much appreciated

Olaf

--
http://www.team-noehring.de
Jul 17 '05 #9
0000=year wrote:
Hi

does anyone of you know a save method on PHP to relyably, maybe using
other programs create scrennshots (thumbnails) of websites?

I am the administrator of the open source project (at SourceForge) "TSEP -
The Search Engine Project" (http://tsep.sf.net) and we might want to show
pictures of the website our search engine has found. The generation
process of the thumbnails should be pretty automatic (as much as possible)

My tries to find an "optimal" solution did not bring any good results yet,
so I am hopeing for better information here.


mumble... ok... it is not done with PHP... but I think this could help...
there is a command (can't recall it's name right now) which allows you to
capture an X screenshot from the command line. Basically what you need to
to is a file (or a SQL table) containing all the URLs to be "shooted". Then
have them opened with Firefox (using the '-remote "openurl()"' function)
and the script to capture the screen. Once the capture is done you can load
the next site.

The only part missing is the name of the proggie to do the screenshot from
the console. I am 101% sure it exists...

hope it helps... or drop me a line... I'll be happy to help...

--
William Maddler
Jul 17 '05 #10
William Maddler wrote:
0000=year wrote:
mumble... ok... it is not done with PHP... but I think this could help...
there is a command (can't recall it's name right now) which allows you to
capture an X screenshot from the command line. Basically what you need to
to is a file (or a SQL table) containing all the URLs to be "shooted". Then
have them opened with Firefox (using the '-remote "openurl()"' function)
and the script to capture the screen. Once the capture is done you can load
the next site.

The only part missing is the name of the proggie to do the screenshot from
the console. I am 101% sure it exists...

hope it helps... or drop me a line... I'll be happy to help...


(I used mozilla, but I think it would apply for firefox too)

I wrote something like this, but there are numerous problems with this
setup. The first being that some sites may open new windows, or
javascript alerts. The alerts will prevent mozilla from listening to
the -remote command. This could be prevented by disabling javascript,
but that could cause other problems with rendering. Probably wouldn't
be too bad though.

Second, it can take a long time to know when a URL has been loaded.
Basically you just have to say "Wait x number of seconds and then
shoot." The problem with this is that if the site loads fast, you waste
time waiting for nothing. If the site is really slow, you end up taking
a picture of nothing, or taking a picture when it's only partially loaded.

Finally, any internal browser errors will result in a blank picture.
Either one of just the alert throw up, or the desktop background.

The code I wrote, I let people use, and I described how to get it
running, which was a chore in and of itself because you had to install
everything required by firefox, like X and gtk and libIDL, etc. The
code is long gone now because of a server-crash, but it was horribly
slow and very prone to the faults above. The ideal method of doing this
would to be create a custom application using gecko which will render to
a file. I though about this at the time too, but I don't have the
skill, nor the time to look at even starting to do this. I have seen a
few commercial products that will render a website to a .jpg, but I
forget the name of them now.

For what it's worth, the program you were trying to recall that takes a
screen shot is the 'import' command, provided by Image Magick.

'import -window root -quality 85 url.jpg' That's the basic command I
used. I included the scaleing information as well, but I forgot the
flags to do that by now.
Jul 17 '05 #11
JDS
On Sun, 23 Jan 2005 19:47:36 +0100, Mathias wrote:
As PHP is a server side programming language it is impossible to make
screenshots of the client screen with it! Sorry, but i guess you have to
take the screenshots on your own. ;-)


What if you have a headless rendering engine on your server that can
output data to a file instead of the screen?

--
JDS | je*****@go.away.com
| http://www.newtnotes.com

Jul 17 '05 #12
kicken wrote:
<snip>
(I used mozilla, but I think it would apply for firefox too)

<snip>

I bookmarked and saved your code sometimes ago. But, I see the links
are now dead. IMHO, if they're up, you may get some feedbacks and
suggestions to improve that code.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #13
R. Rajesh Jeba Anbiah wrote:
kicken wrote:
<snip>
(I used mozilla, but I think it would apply for firefox too)


<snip>

I bookmarked and saved your code sometimes ago. But, I see the links
are now dead. IMHO, if they're up, you may get some feedbacks and
suggestions to improve that code.


Problem is I don't have the code anymore. I keep my server at our house
and around last october one of my sisters friends accidently threw CD
Player into it which broke the CPU fan and also messed up the harddrive.
Couldn't get it back, lost a lot of stuff that day. I could probably
re-write it, didn't consist of much, but I simply don't want to, at
least not now.
Jul 17 '05 #14
kicken wrote:
R. Rajesh Jeba Anbiah wrote:
kicken wrote:
<snip>
(I used mozilla, but I think it would apply for firefox too)
<snip>

I bookmarked and saved your code sometimes ago. But, I see the links are now dead. IMHO, if they're up, you may get some feedbacks and
suggestions to improve that code.


Problem is I don't have the code anymore. I keep my server at our

house and around last october one of my sisters friends accidently threw CD Player into it which broke the CPU fan and also messed up the harddrive. Couldn't get it back, lost a lot of stuff that day. I could probably re-write it, didn't consist of much, but I simply don't want to, at
least not now.


Sad news. *Fortunately*, I did save your webshot scripts and I have
them. If you need them, please respond, I'll mail you _or_ if you
think, it's ok to post your code here, I'll be happy to do so.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #15
R. Rajesh Jeba Anbiah wrote:

Sad news. *Fortunately*, I did save your webshot scripts and I have
them. If you need them, please respond, I'll mail you _or_ if you
think, it's ok to post your code here, I'll be happy to do so.


Cool, I'll definitally take them again. Might be better to email them,
most people dislike attachments in newsgroups I think.
Jul 17 '05 #16
kicken wrote:
R. Rajesh Jeba Anbiah wrote:

Sad news. *Fortunately*, I did save your webshot scripts and I have
them. If you need them, please respond, I'll mail you _or_ if you
think, it's ok to post your code here, I'll be happy to do so.

Cool, I'll definitally take them again. Might be better to email

them, most people dislike attachments in newsgroups I think.


I access NG via GG and emails are munged and so couldn't find your
email address. Would be nice if you mail me (email address at my
sig-block) or post your email address in such a way that GG won't mung
it.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #17
I noticed that Message-ID:
<11**********************@z14g2000cwz.googlegroups .com> from R. Rajesh
Jeba Anbiah contained the following:

I access NG via GG


Yuk. Why not get a proper feed for free? www.news.individual.net

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #18
Geoff Berrow wrote:
I noticed that Message-ID:
<11**********************@z14g2000cwz.googlegroups .com> from R. Rajesh Jeba Anbiah contained the following:

I access NG via GG


Yuk. Why not get a proper feed for free? www.news.individual.net


Thanks for your kind suggestion. I somehow used to web based
interface for NG since deja. Sometime ago I tried
<news://freenews.netfront.net/comp.lang.php> with Agent, but found it a
big mess (IMHO).

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #19
sam
hi Olaf Noehring 0000=year

I found that you solve the problem and you let the php script tp take a
screen shot

and i'm searching about that?
can you tell more information about how to do that please?
thanks
Sam

Jul 17 '05 #20
If I remember correctly, the command-line/console screenshot app is called
"xwd" (x window dump). Google it. So there is the missing piece of your
puzzle. But it still seems like quite a "bulky" solution.

Regards,

[-b]

"William Maddler" <ne********@maddler.net> wrote in message
news:35*************@individual.net...
0000=year wrote:
Hi

does anyone of you know a save method on PHP to relyably, maybe using
other programs create scrennshots (thumbnails) of websites?

I am the administrator of the open source project (at SourceForge)
"TSEP -
The Search Engine Project" (http://tsep.sf.net) and we might want to show
pictures of the website our search engine has found. The generation
process of the thumbnails should be pretty automatic (as much as
possible)

My tries to find an "optimal" solution did not bring any good results
yet,
so I am hopeing for better information here.


mumble... ok... it is not done with PHP... but I think this could help...
there is a command (can't recall it's name right now) which allows you to
capture an X screenshot from the command line. Basically what you need to
to is a file (or a SQL table) containing all the URLs to be "shooted".
Then
have them opened with Firefox (using the '-remote "openurl()"' function)
and the script to capture the screen. Once the capture is done you can
load
the next site.

The only part missing is the name of the proggie to do the screenshot from
the console. I am 101% sure it exists...

hope it helps... or drop me a line... I'll be happy to help...

--
William Maddler

Jul 17 '05 #21
Hi Rajesh Jeba

Can you please email me that stuff too?
ol******@team-noehring.de
please change 0000 to 2005

thanks already
Olaf

R. Rajesh Jeba Anbiah wrote:
> kicken wrote:
> <snip>
>
>>(I used mozilla, but I think it would apply for firefox too)
>
> <snip>
>
> I bookmarked and saved your code sometimes ago. But, I see the links > are now dead. IMHO, if they're up, you may get some feedbacks and
> suggestions to improve that code.


Problem is I don't have the code anymore. I keep my server at our

house
and around last october one of my sisters friends accidently threw CD

Player into it which broke the CPU fan and also messed up the

harddrive.
Couldn't get it back, lost a lot of stuff that day. I could

probably
re-write it, didn't consist of much, but I simply don't want to, at
least not now.


Sad news. *Fortunately*, I did save your webshot scripts and I have
them. If you need them, please respond, I'll mail you _or_ if you
think, it's ok to post your code here, I'll be happy to do so.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/


--
http://www.team-noehring.de
Jul 17 '05 #22
Hi Sam

no solution has turned up yet. I have surfed the web for screenshot
utilities - but none of them seems to be able to to the job either (crawl +
take screenshots)

Olaf
I found that you solve the problem and you let the php script tp take a
screen shot

and i'm searching about that?
can you tell more information about how to do that please?

--
http://www.team-noehring.de
Jul 17 '05 #23

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

Similar topics

2
by: S. Stilwell | last post by:
I'm trying to write a small program that will go to a particular web site and download an image file on a schedule. I just need to know how to save the file to disk from a website. Any help would...
7
by: Iris601 | last post by:
Hello, I had posted my website about 2 weeks ago asking for comments of how I could better my website. We have worked very hard to organize our website and have made changes to our shopping cart. ...
1
by: Shawn B. | last post by:
Greetings, I have have been working for almost 18 months on a set of WebControls where some are similar to the ASP.NET standard and well-enhanced while other controls are completely new and...
19
by: Swaregirl | last post by:
Hello, I would like to build a website using ASP.NET. I would like website visitors to be able to download code that I would like to make available to them and that would be residing on my...
2
by: 1388-2/HB | last post by:
I've got a small sockets application where I communicate with a web server via async sockets method. Using the ASCIIEncoding Class, I convert strings to byte arrays (and vice versa) in...
10
by: JP Bless | last post by:
Hi all, I have a database Access/MSDE and would like to have a website so users can search the data and update some records/fields through the website.... And I have high speed internet...
0
by: picturegoogle | last post by:
Very good picture website http://www.92ee.com Free provides the picture, the animal picture, colored picture,scenery picture, traveling picture, background picture http://www.92ee.com/photo
1
by: OutdoorWorldAdventures | last post by:
I have been trying to do any type of form that my web viewers can submit a picture and story for review to be submited to my website. I use Yahoo Business as my host and everything. I even tried...
13
by: sevenz24 | last post by:
So i have my images set up like this : http://cgi.ebay.com/Tippmann-98-paintBall-Marker-Gun-Paint-Ball_W0QQitemZ250274334261QQihZ015QQcategoryZ47248QQssPageNameZWDVWQQrdZ1QQcmdZViewItem Scroll...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.