PHP code example of sycho / license-detector
1. Go to this page and download the library: Download sycho/license-detector 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/ */
sycho / license-detector example snippets
use LicenseDetector\Detector;
$detector = new Detector();
// By license contents
$license = $detector->parse($contents);
// By file path
$license = $detector->parseByPath($path_to_license);