PHP code example of akrambe / shotify

1. Go to this page and download the library: Download akrambe/shotify 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/ */

    

akrambe / shotify example snippets




F print from url
Shotify\Launcher::fromUrl('http://example.com')
            ->saveToPDF('example.pdf');

// Screenshot
Shotify\Launcher::fromUrl('http://example.com')
            ->captureScreenshot('hello.png',
                (new Shotify\Options\ScreenshotOptions)
                    ->setQuality(70)
                    ->setFormat('png')
            );
            
// Get document outer HTML
$html = Shotify\Launcher::fromUrl('http://example.com')
            ->outerHtml();