Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $t['curl'] = _runApi('https://www.medcom.id/feed/');
- $parsingrss = $t['curl'];
- $raw = simplexml_load_string($parsingrss, "SimpleXMLElement", LIBXML_NOCDATA);
- $json = json_encode($raw);
- $info = json_decode($json,TRUE);
- // $item = $info->channel->item;
- // $image = $info->channel->image;
- //echo $movies->movie[0]->plot;
- /*
- $dt0=[
- strlen($parsingrss),
- count($item),
- $image,
- ];
- */
- $dt=array();
- for($i=0;$i<5;$i++){
- $params=$info['channel']['item'][$i];
- $dt[]= [
- 'title'=>$params['title'],
- 'link'=>$params['link'],
- 'guid'=>$params['guid'],
- 'description'=>$params['description']
- ];
- }
- echo "<pre>";
- print_r($dt);
- echo "</pre>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement