PHP code example of jerrybendy / get-favicon

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

    

jerrybendy / get-favicon example snippets



con = new \Jerrybendy\Favicon\Favicon;

/**
 * 获取图标并显示在浏览器上
 */
$favicon->getFavicon('http://blog.icewingcc.com', false);


$favicon = new \Jerrybendy\Favicon\Favicon;

$favicon->setDefaultIcon('default-icon.png');

$favicon = new \Jerrybendy\Favicon\Favicon;

$favicon->debug_mode = TRUE;

$favicon->setFileMap(array(
    '/www\.google\.com/i'   => 'http://www.baidu.com/favicon.ico',
    '/www\.facebook\.com/i' => 'cache/facebook.png',
));

$favicon->getFavicon('https://www.google.com', false);

$favicon = new \Jerrybendy\Favicon\Favicon;

$favicon->debug_mode = TRUE;