...
|
...
|
@@ -23,12 +23,16 @@ if ($xml === false) {
|
23
|
23
|
$article['pubDate'] = $item->updated;
|
24
|
24
|
$article['timestamp'] = strtotime($item->updated);
|
25
|
25
|
$article['description'] = $item->summary;
|
26
|
|
- $article['image']="liberation.jpg";
|
|
26
|
+ $article['image']="img/liberation.png";
|
27
|
27
|
foreach ($item->link as $item2 )
|
28
|
28
|
{
|
29
|
|
- if( 0 == strcmp( $item2['type'], "image/jpeg") ) {
|
|
29
|
+ if( ( 0 == strcmp( $item2['type'], "image/jpeg") ) ||
|
|
30
|
+ ( 0 == strcmp( $item2['type'], "image/png") ) ) {
|
30
|
31
|
$pos_start=strpos($item2['href'],"?modified_at");
|
31
|
|
- $article['image']=substr($item2['href'],0,$pos_start);
|
|
32
|
+ if( $pos_start ) {
|
|
33
|
+ $image_link=substr($item2['href'],0,$pos_start);
|
|
34
|
+ $article['image']=substr($item2['href'],0,$pos_start);
|
|
35
|
+ }
|
32
|
36
|
}
|
33
|
37
|
}
|
34
|
38
|
|