You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello there, Thank you for your small and such powerful framework. I use this framework to create simple sites/web-apps with ease. I have one suggestion.
Can you add atom reader beside RSS reader? I cloned RSS function and changed to atom reader. Here you go. I can create a pull request if you want to add this code to core.
functionatom($url,$max=10,$tags=NULL) {
if (!$data=$this->request($url))
returnFALSE;
// Suppress errors caused by invalid XML structureslibxml_use_internal_errors(TRUE);
$xml=simplexml_load_string($data['body'],
NULL,LIBXML_NOBLANKS|LIBXML_NOERROR);
if (!is_object($xml))
returnFALSE;
$out=[];
if (isset($xml->entry)) {
$out['source']=(string)$xml->title;
$max=min($max,count($xml->entry));
for ($i=0;$i<$max;$i++) {
$item=$xml->entry[$i];
$list=[''=>NULL]+$item->getnamespaces(TRUE);
$fields=[];
foreach ($listas$ns=>$uri)
foreach ($item->children($uri) as$key=>$val)
$fields[$ns.($ns?':':'').$key]=(string)$val;
$out['feed'][]=$fields;
}
}
elsereturnFALSE;
Base::instance()->scrub($out,$tags);
return$out;
}
The text was updated successfully, but these errors were encountered:
Hello there, Thank you for your small and such powerful framework. I use this framework to create simple sites/web-apps with ease. I have one suggestion.
Can you add atom reader beside RSS reader? I cloned RSS function and changed to atom reader. Here you go. I can create a pull request if you want to add this code to core.
The text was updated successfully, but these errors were encountered: