diff --git a/inc/databap.php b/inc/databap.php index 5de2c82..43e523e 100644 --- a/inc/databap.php +++ b/inc/databap.php @@ -554,6 +554,35 @@ class Databap extends PhpObject } } } + + //TODO add http://www.biportal.org/sap_bi_blog + + //SAP BW BW + $oDom = $this->getRemotePageDom('http://sapbwbw.com/'); + $aoArticles = $oDom->getElementsByTagName('header'); + foreach($aoArticles as $oArticle) + { + if($oArticle->getAttribute('class')=='entry-header') + { + $asArticleInfo = array(); + $aoLinks = $oArticle->getElementsByTagName('a'); + foreach($aoLinks as $oLink) + { + $asArticleInfo['link'] = $oLink->getAttribute('href'); + $asArticleInfo['title'] = ucfirst(trim($oLink->nodeValue)); + break; + } + $aoLinks = $oArticle->getElementsByTagName('time'); + foreach($aoLinks as $iCount=>$oLink) break; + + $asArticleInfo['date'] = mb_substr($oLink->getAttribute('datetime'), 0, 10); + $asArticleInfo['first_name'] = 'Claudio'; + $asArticleInfo['last_name'] = 'Ciardelli'; + $asArticleInfo['email'] = ''; + $asArticles[] = $asArticleInfo; + } + } + return $asArticles; }