PHP code example of sbominator / scaninator

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

    

sbominator / scaninator example snippets



nner = new \Scaninator\Scaninator('path/to/file.php');
$dependencies = $scanner->get_dependencies();

print_r($dependencies);


nner = new \Scaninator\Scaninator('https://github.com/owner/repo');
$sbom = $scanner->get_sbom();

print_r($sbom);
bash
php cli.php <filename or GitHub URL>
bash
php cli.php path/to/file.php
bash
php cli.php https://github.com/owner/repo/blob/main/path/to/file.php