SitePoint Sponsor |
|
User Tag List
Results 1 to 25 of 122
Thread: Web Page screen shot!!!
-
Dec 31, 2002, 12:45 #1
- Join Date
- Oct 2002
- Posts
- 229
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Web Page screen shot!!!
Ok, this might be expecting the impossible but i'll ask anyway!!!
Is there anyway that php can grab a screenshot of a web page and save it as a jpg/gif.
A client wants some links for their site and if possible I would likea small thumbnail of the linksite displayed on my clients site.
I doubt this is possible though...
Happy New Year.
Eternity
-
Dec 31, 2002, 13:43 #2
- Join Date
- May 2002
- Location
- United States
- Posts
- 457
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I really don't know if it is possible in PHP, but couldn't you have a cron job/scheduled event run an image capture program on the server and save a screenshot? Sorry I couldn't be more specific.
Compwizard
"There are 10 kinds of people in this world -- those who know binary, and those who don't."
-
Dec 31, 2002, 15:50 #3
This isnt possible. Screenshots are entirely dependant on the operating system/browser. So to get a screenshot with PHP you would need to write a graphical user-agent (browser) in PHP.
THE INSTRUCTIONS BELOW ARE OLD AND MAY BE INACCURATE.
THIS INSTALL METHOD IS NOT RECOMMENDED, IT MAY RUN
OVER YOUR DOG. <-- MediaWiki installation guide
-
Jan 1, 2003, 08:52 #4
- Join Date
- Jun 2002
- Location
- Huntsville Alabama
- Posts
- 394
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Phil.Roberts
This isnt possible. Screenshots are entirely dependant on the operating system/browser. So to get a screenshot with PHP you would need to write a graphical user-agent (browser) in PHP.
-
Jan 1, 2003, 09:09 #5
-sigh- No it isnt.
THE INSTRUCTIONS BELOW ARE OLD AND MAY BE INACCURATE.
THIS INSTALL METHOD IS NOT RECOMMENDED, IT MAY RUN
OVER YOUR DOG. <-- MediaWiki installation guide
-
Jan 1, 2003, 09:39 #6
- Join Date
- Jun 2002
- Location
- Huntsville Alabama
- Posts
- 394
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Phil.Roberts
-sigh- No it isnt.
-
Jan 1, 2003, 10:14 #7
- Join Date
- Nov 2001
- Location
- Atlanta, GA, USA
- Posts
- 5,011
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I would say it is possible, but a lot of trouble and would require triggering other applications.
For example, if you were using OSX you could have PHP trigger an AppleScript which could load a given page and take a screenshot and you could convert that file...
I'm sure something like that could be done with Windows or Linux as well.
Quite possibly not worth doing, but worth examining if you are interested.Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?
-
Jan 1, 2003, 10:27 #8
- Join Date
- Mar 2002
- Location
- Svíþjóð
- Posts
- 4,080
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Why php?
Why not a stand-alone app (VB, C#) that reads urls from a list and then grabs the page and takes the screenshot?
(And then upload the images to the server...)
And, yes, I know you can write stand-alone apps in php too, but I don't know how to re-use the web browser component of IE from that language...
-
Jan 1, 2003, 21:46 #9
Re: Web Page screen shot!!!
Originally posted by kjc
...
A client wants some links for their site and if possible I would likea small thumbnail of the linksite displayed ...
-
Jan 1, 2003, 21:48 #10
- Join Date
- Oct 2001
- Location
- Philippines
- Posts
- 698
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It is, however, interesting to find out how to do it.
The Star Circle Quest Community - Community website for SCQ fans.
Telebisyon.net - Reference guide to TV series shown in the Philippines.
Lyrics Server Online! - All the lyrics you can get on one website.
-
Jan 1, 2003, 22:09 #11
- Join Date
- Jun 2001
- Location
- In your basement
- Posts
- 1,268
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The second post is accurate..
Write a shell script that will take a screen shot of a page, and store it somewhere, I know that can be done, I forget what site it was, but a guy had a perl shell script that did it for him.. if only I could rememberEric Coleman
We're consentratin' on fallin' apart
We were contenders, now throwin' the fight
I just wanna believe, I just wanna believe in us
-
Jan 1, 2003, 22:11 #12
- Join Date
- Oct 2001
- Location
- Philippines
- Posts
- 698
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
See. It is possible after all.
The Star Circle Quest Community - Community website for SCQ fans.
Telebisyon.net - Reference guide to TV series shown in the Philippines.
Lyrics Server Online! - All the lyrics you can get on one website.
-
Jan 1, 2003, 22:21 #13
- Join Date
- Oct 2002
- Posts
- 69
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I tried to do this a few weeks back, but I don't have the knowledge to do it on my own
I have Apache and PHP set up on a Windows box. I made a batch file to open IE and load a URL.
I had two problems though:
1) While I could get PHP to execute the batch file, I couldn't figure out how to get PHP to send a URL to the batch file (the only way I could get it to work was to hard code a URL in the batch file)
2) I couldn't figure out how to get the batch file to simulate a keystroke (such as F11) so that the screen capture program in the background would activate and take a screenshot.
Peter
-
Jan 1, 2003, 22:40 #14
- Join Date
- Jun 2001
- Location
- In your basement
- Posts
- 1,268
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
If your usin exec or another php command to open IE, you can tell it a url to open like so:
iexplorer.exe "http://site.com"
via command line ( assuming iexplorer.exe is in the CWD )Eric Coleman
We're consentratin' on fallin' apart
We were contenders, now throwin' the fight
I just wanna believe, I just wanna believe in us
-
Jan 1, 2003, 22:51 #15
- Join Date
- Oct 2002
- Posts
- 69
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Any idea how to simulate a keystroke?
-
Jan 1, 2003, 22:58 #16
- Join Date
- Oct 2001
- Location
- Philippines
- Posts
- 698
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Why not just make a program to do this? Using VB.net perhaps?
The Star Circle Quest Community - Community website for SCQ fans.
Telebisyon.net - Reference guide to TV series shown in the Philippines.
Lyrics Server Online! - All the lyrics you can get on one website.
-
Jan 1, 2003, 23:00 #17Originally posted by friend_al_23
See. It is possible after all.
-
Jan 1, 2003, 23:04 #18
- Join Date
- Oct 2001
- Location
- Philippines
- Posts
- 698
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Siltrince
Everything is possible , you just have to see if it's worth all te troubleThe Star Circle Quest Community - Community website for SCQ fans.
Telebisyon.net - Reference guide to TV series shown in the Philippines.
Lyrics Server Online! - All the lyrics you can get on one website.
-
Jan 1, 2003, 23:04 #19
- Join Date
- Oct 2002
- Posts
- 69
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The reason I don't just make a program for it is because I don't know much about programming. Just a little of perl, php, and javascript.
-
Jan 1, 2003, 23:12 #20
- Join Date
- Oct 2001
- Location
- Philippines
- Posts
- 698
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by peternm22
The reason I don't just make a program for it is because I don't know much about programming. Just a little of perl, php, and javascript.The Star Circle Quest Community - Community website for SCQ fans.
Telebisyon.net - Reference guide to TV series shown in the Philippines.
Lyrics Server Online! - All the lyrics you can get on one website.
-
Jan 1, 2003, 23:25 #21
- Join Date
- Jun 2001
- Location
- In your basement
- Posts
- 1,268
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hrm, i'll do some research on simulating key strokes
There has to be a command that you can run via shell to take a screen shot...Eric Coleman
We're consentratin' on fallin' apart
We were contenders, now throwin' the fight
I just wanna believe, I just wanna believe in us
-
Jan 1, 2003, 23:46 #22
- Join Date
- Oct 2002
- Posts
- 69
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yeah... I just found a way to run the screen capture program via command line. Here's what the batch file looks like so far:
Code:start iexplore.exe http://www.hotmail.com start C:\HQScreen.exe 0 PNG 8 picture C:\
Any ideas?
-
Jan 1, 2003, 23:53 #23
- Join Date
- Jun 2001
- Location
- In your basement
- Posts
- 1,268
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
hrm...
No clue on that again, im sure there is some type of pause( [int] seconds ); command, but im not a shell scripter, so no clue ;PEric Coleman
We're consentratin' on fallin' apart
We were contenders, now throwin' the fight
I just wanna believe, I just wanna believe in us
-
Jan 1, 2003, 23:58 #24
- Join Date
- Oct 2002
- Posts
- 69
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
So close, yet so far away
-
Jan 2, 2003, 00:03 #25
- Join Date
- Oct 2001
- Location
- Philippines
- Posts
- 698
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Why not trigger a count or something after the page pops-up?
The Star Circle Quest Community - Community website for SCQ fans.
Telebisyon.net - Reference guide to TV series shown in the Philippines.
Lyrics Server Online! - All the lyrics you can get on one website.
Bookmarks