PHP code example of o6web / favicon-collection

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

    

o6web / favicon-collection example snippets


use o6web\FaviconCollection\Builder;

$builder = new Builder(new IcoConverter());

$builder->build($sourceFilePath, $backgroundColorHex, $gutterSpace, $arrayOfValidSizes, $shouldGenerateFaviconIco);
if ($builder->hasOutputFiles()) {
	$builder->zipOutputFiles($outputFilePath); // archive the output files to the specified zip
}