PHP code example of secomapp / browsershot
1. Go to this page and download the library: Download secomapp/browsershot 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/ */
secomapp / browsershot example snippets
// app/config/app.php
'providers' => [
'...',
'Spatie\Browsershot\BrowsershotServiceProvider'
];
$browsershot = new Spatie\Browsershot\Browsershot();
$browsershot
->setURL('http://www.arstechnica.com')
->setWidth('1024')
->setHeight('768')
->save('targetdirectory/arstechnica-browsershot.jpg');