1. Go to this page and download the library: Download dawood/phpscreenrecorder library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dawood / phpscreenrecorder example snippets
use dawood\PhpScreenRecorder\ScreenRecorder;
$screenRecorder=new ScreenRecorder();
$screenRecorder->setScreenSizeToCapture(1920,1080);
$screenRecorder->startRecording(__DIR__.DIRECTORY_SEPARATOR.'myVideo');
sleep(5+2);//doing random stuff
//when done stop recording
$screenRecorder->stopRecording();
print "video is saved at :\"".$screenRecorder->getVideo().'"'.PHP_EOL;