miniflux-legacy/models/proxy.php
Mathias Kresin cfaa25f667 minor improvements
- enable debug logging for image proxy
- show enclosure image only if no article content exists
- do not store empty favicons
- fix typo in get_item_favicons (worked anyway since get_favicons
  returned all known favicons instead)
2015-01-13 20:27:33 +01:00

29 lines
527 B
PHP

<?php
namespace Model\Proxy;
use Model\Config;
use PicoFeed\Client\Client;
use PicoFeed\Client\ClientException;
function download($url)
{
try {
$client = Client::getInstance();
$client->setUserAgent(Config\HTTP_USER_AGENT);
$client->execute($url);
$content = array(
$client->getContent(),
$client->getContentType(),
);
}
catch (ClientException $e) {
$content = array(false, false);
}
Config\write_debug();
return $content;
}