Skip to content
Snippets Groups Projects
Select Git revision
  • a2f7042a218691c4a23caf9f25b36cd5637a2b8c
  • master default protected
  • optimize-images
  • 5.0
  • 4.1
5 results

scanner_example.php

Blame
  • Forked from Digital Experience Group / UNL_Search
    Source project has a limited visibility.
    functions.inc.php 692 B
    <?php
    
    function getCAPData($config)
    {
        try {
            $url = isset($config['proxyUrl']) ? $config['proxyUrl'] :'http://www.getrave.com/rss/unl/channel1'; 
            $alerts = new UNL_Alert_RaveRSS($url);
            
            if (!empty($config['recentTimeframe'])) {
                $filtered = new UNL_Alert_RecentPubDateFilter($alerts->getIterator(), $config['recentTimeframe']);
            } else {
                $filtered = new UNL_Alert_RecentPubDateFilter($alerts->getIterator());
            }
            
            $data = new UNL_Alert_RSSToCAP($filtered);
            $output = $data->getData();
        } catch (Exception $e) {
            $output = array();
        }
    
        return new UNL_Alert_ArrayObject($output);
    }