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\ est\\1.jpg';
system($cmd1);
$cmd2 = 'webscreencapture2.exe "http://www.google.com" e:\\www\ est\\2.jpg';
system($cmd2);
$cmd3 = 'webscreencapture3.exe "http://www.yahoo.com" e:\\www\ est\\3.jpg';
system($cmd3);
Now I met a few problems.
- How to make PHP run $ cmd1, $ cmd2, $ cmd3 at the same time? Rather than the implementation of the queue?
- 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?
- 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) ?
- Is it possible to set the code that every 24 hours run the screenshot code automatically ?
Thank you.