Cara Mendapatkan Kontent RSS dengan PHP

Wednesday, May 6, 20150 comments

RSS Parsed
kali ini saya akan akan membagikan cara mendapatkan kontent RSS dengan PHP, anda cukup lihat script berikut:
<?php

function getRSS($feed_url){

$content = file_get_contents($feed_url);

$data = new SimpleXmlElement($content);

echo "<ul>";

foreach($data->channel->item as $entry) {

echo "<li><a href='".$entry->link."' title='".$entry->title."'>".$entry->title."</a></li>";

}

echo "</ul>";

}



getRSS("URL_RSS");

?>


jika masih bingung silahkan tanyakan dibawah smile
Share this article :

Post a Comment

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Tutorial Web Programming - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger