1. Go to this page and download the library: Download arthurhoaro/favicon 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/ */
$favicon = new \Favicon\Favicon();
// return the generated filename inside the cache folder
$favicon->get('http://hoa.ro', FaviconDLType::DL_FILE_PATH);
// return false
$favicon->get('http://nofavicon.tld');
$favicon = new \Favicon\Favicon();
// return the binary string of the downloaded favicon
$favicon->get('http://hoa.ro', FaviconDLType::RAW_IMAGE);
// return false
$favicon->get('http://nofavicon.tld');
$favicon = new Favicon();
$settings = array(
// Cache directory
'dir' => '/tmp/',
// Cache timeout in seconds
'timeout' => 86400,
// Default image when no favicon is found
'defaultico' => 'img/fav.ico'
);
$favicon->cache($settings);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.