Exemple #1
0
 /**
  * Return a link to favicon
  * TODO: Try using Bronco one :
  * http://www.warriordudimanche.net/article164/hands-up-give-me-your-favicon-right-now
  *
  * @param string $feedHash Hash corresponding to a feed
  *
  * @return string that corresponds to favicon of feed
  */
 public function getFaviconFeed($feedHash)
 {
     $htmlUrl = $this->_data['feeds'][$feedHash]['htmlUrl'];
     $url = 'http://www.google.com/s2/favicons?domain=' . $htmlUrl;
     $file = FAVICON_DIR . '/favicon.' . $feedHash . '.ico';
     if ($this->kfc->isLogged() && $this->kfc->addFavicon) {
         MyTool::grabToLocal($url, $file);
     }
     if (file_exists($file)) {
         return $file;
     } else {
         return $url;
     }
 }
Exemple #2
0
 /**
  * Return a link to favicon
  * TODO: Try using Bronco one :
  * http://www.warriordudimanche.net/article164/hands-up-give-me-your-favicon-right-now
  *
  * @param string $feedHash Hash corresponding to a feed
  *
  * @return string that corresponds to favicon of feed
  */
 public function getFaviconFeed($feedHash)
 {
     $htmlUrl = $this->_data['feeds'][$feedHash]['htmlUrl'];
     $url = 'http://getfavicon.appspot.com/' . $htmlUrl . '?defaulticon=bluepng';
     $file = FAVICON_DIR . '/favicon.' . $feedHash . '.ico';
     if ($this->kfc->isLogged() && $this->kfc->addFavicon) {
         MyTool::grabToLocal($url, $file);
     }
     if (file_exists($file)) {
         return $file;
     } else {
         return $url;
     }
 }