View difference between Paste ID: DSmL8br7 and GrMZsw4m
SHOW: | | - or go back to the newest paste.
1
2
$t['curl']                = _runApi('https://www.medcom.id/feed/');
3
        $parsingrss               = $t['curl'];
4
 
5
        $raw                      =   simplexml_load_string($parsingrss, "SimpleXMLElement", LIBXML_NOCDATA);
6
        $json                     = json_encode($raw);
7
        $info                     = json_decode($json,TRUE);
8-
        $item                     = $info->channel->item;
8+
9
       // $item                     = $info->channel->item;
10-
        $image                    = $info->channel->image;
10+
11
       // $image                    = $info->channel->image;
12
        //echo $movies->movie[0]->plot;
13
		/*
14
        $dt0=[
15
            strlen($parsingrss),
16
            count($item),
17-
        $dt=[];
17+
18
        ];
19
		*/
20
        $dt=array();
21
        for($i=0;$i<5;$i++){
22
            $params=$info['channel']['item'][$i];
23
           
24
            $dt[]= [
25
                'title'=>$params['title'],
26
                'link'=>$params['link'],
27
                'guid'=>$params['guid'],
28
                'description'=>$params['description']
29
            ];
30
        }
31
        echo "<pre>";
32
        print_r($dt);    
33
        echo "</pre>";