I'm study with website screenshot these days. I selected webscreencapture. I write the official bat command into php code. I have copied three webscreencapture.exe, I would like to catch 3 websites' screenshot at the same time. $cmd1 = 'webscreencapture1.exe "http://www.youtube.com" e:\www\test\1.jpg'; system($cmd1); $cmd2 = 'webscreencapture2.exe "http://www.google.com" e:\www\test\2.jpg'; system($cmd2); $cmd3 = 'webscreencapture3.exe "http://www.yahoo.com" e:\www\test\3.jpg'; system($cmd3); HTML: Now I met a few problems. 1. How to make PHP run $ cmd1, $ cmd2, $ cmd3 at the same time? Rather than the implementation of the queue? 2. webscreencapture sometimes have bugs that has success get the page's screenshot, but also repeated the system ($ cmd) command many times. How to do the one command only once, then automatic termination this line system ($ cmd) command? 3. I did not find the time delay code from webscreencapture official website , I would like to catch some of the online video sites. How to set a time delay in the system ($ cmd) ? 4. Is it possible to set the code that every 24 hours run the screenshot code automatically ? Thank you.
1. try do execute 3 commands at a time and see if it's possible 2. try to see if there are options like webscreencapture.exe /someoptions 3. system pause is sleep 3 Code (markup): ; where 3 = 3 seconds 4. cron job
Hi gapz101, how to execute 3 commands at one time? and where to put sleep3? Thanks. <?php $cmd1 = 'webscreencapture1.exe sleep 3 "http://www.youtube.com" e:\www\test\1.jpg'; system($cmd1); $cmd2 = 'webscreencapture2.exe sleep 3 "http://www.google.com" e:\www\test\2.jpg'; system($cmd2); $cmd3 = 'webscreencapture3.exe sleep 3 "http://www.yahoo.com" e:\www\test\3.jpg'; system($cmd3); ?> Code (markup):
not possible!! <?php $cmd1 = 'webscreencapture1.exe "http://www.youtube.com" e:\www\test\1.jpg | sleep 3'; system($cmd1); //... PHP:
Thanks, it works. but now I know webscreencapture not support flash... Maybe I will search for a new one.