mirror of
https://github.com/LinkStackOrg/LinkStack.git
synced 2025-02-02 20:27:05 +01:00
Remove all external dependencies
This commit is contained in:
parent
16b4d652c9
commit
775e5bea00
@ -2356,12 +2356,13 @@ class simple_html_dom
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
function getFavIcon($url) {
|
function getFavIcon($url) {
|
||||||
|
try {
|
||||||
$urlICO = $url . "/favicon.ico";
|
$urlICO = $url . "/favicon.ico";
|
||||||
$urlICO = str_replace("//favicon.ico","/favicon.ico",$urlICO);
|
$urlICO = str_replace("//favicon.ico","/favicon.ico",$urlICO);
|
||||||
|
|
||||||
$dom = new simple_html_dom();
|
$dom = new simple_html_dom();
|
||||||
$dom->load(file_get_contents($url));
|
$dom->load(file_get_contents($url));
|
||||||
$favicon = '';
|
$favicon = url('littlelink/icons/website.svg');
|
||||||
|
|
||||||
|
|
||||||
if(!function_exists('get_headers'))
|
if(!function_exists('get_headers'))
|
||||||
@ -2420,7 +2421,7 @@ foreach($dom->find('link') as $e)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
} catch (exception $e) {$favicon = url('littlelink/icons/website.svg');}
|
||||||
return $favicon;
|
return $favicon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user