diff --git a/bridges/MalikiBridge.php b/bridges/MalikiBridge.php
new file mode 100644
index 00000000..6ffed1fe
--- /dev/null
+++ b/bridges/MalikiBridge.php
@@ -0,0 +1,39 @@
+returnError('Could not request Maliki.', 404);
+ $count=0;
+ foreach($html->find('div.boite_strip') as $element) {
+ if(!empty($element->find('a',0)->href) and $count < 20) {
+ $item = new \Item();
+ $item->uri = 'http://www.maliki.com/'.$element->find('a',0)->href;
+ $item->thumbnailUri = 'http://www.maliki.com/'.$element->find('img',0)->src;
+ $item->title = $element->find('img',0)->title;
+ $item->timestamp = strtotime(str_replace('/', '-', $element->find('span.stylepetit', 0)->innertext));
+ $item->content = '
';
+ $this->items[] = $item;
+ $count++;
+ }
+ }
+ }
+
+ public function getName(){
+ return 'Maliki';
+ }
+
+ public function getURI(){
+ return 'http://www.maliki.com/';
+ }
+
+ public function getCacheDuration(){
+ return 86400; // 24 hours
+ }
+}
diff --git a/index.php b/index.php
index a95fcbb4..1c52ebc5 100644
--- a/index.php
+++ b/index.php
@@ -13,6 +13,7 @@ TODO :
date_default_timezone_set('UTC');
error_reporting(0);
+ini_set('user_agent', 'Mozilla/5.0 (X11; Linux x86_64; rv:20.0; RSS-Bridge; +https://github.com/sebsauvage/rss-bridge/) Gecko/20100101 Firefox/20.0');
//ini_set('display_errors','1'); error_reporting(E_ALL); // For debugging only.
try{
@@ -32,9 +33,6 @@ try{
$format = $_REQUEST['format'];
unset($_REQUEST['format']);
- // FIXME : necessary ?
- // ini_set('user_agent', 'Mozilla/5.0 (X11; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0');
-
$cache = Cache::create('FileCache');
// Data retrieval
@@ -135,4 +133,4 @@ $formats = Format::searchInformation();
RSS-Bridge alpha 0.1