Solve issue #1

This commit is contained in:
Phyks 2014-07-18 18:53:43 +02:00
parent 0390303c1c
commit ce15802830

View File

@ -88,9 +88,26 @@ function getFavicon($urls) {
// Check for errorred feeds wether the favicon.ico file at the root exists // Check for errorred feeds wether the favicon.ico file at the root exists
$second_try = array(); $second_try = array();
foreach ($errors as $url) { foreach ($errors as $url) {
$parsed_url = parse_url(trim($url));
$second_try_url = "";
if(isset($parsed_url['scheme'])) {
$second_try_url .= $parsed_url['scheme'];
}
if(isset($parsed_url['host'])) {
$second_try_url .= $parsed_url['host'];
}
if(isset($parsed_url['port'])) {
$second_try_url .= $parsed_url['port'];
}
if(isset($parsed_url['user'])) {
$second_try_url .= $parsed_url['user'];
}
if(isset($parsed_url['pass'])) {
$second_try_url .= $parsed_url['pass'];
}
$second_try[] = array( $second_try[] = array(
'input_url'=>$url, 'input_url'=>$url,
'url'=>rtrim(trim($url), '/?') . '/favicon.ico' 'url'=>$second_try_url . '/favicon.ico'
); );
} }
$second_try_curl = curl_downloader($second_try, false); $second_try_curl = curl_downloader($second_try, false);