Created
July 13, 2016 07:26
-
-
Save btk/3506d5f8525599eb6e753fbad2b2b2a2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$rssLink = "http://forum.fitekran.com/kategori/-/index.rss"; // Your URL | |
$PostLimit = 8; // Limit of posts that will be crawled. | |
$RSSArr = json_decode(file_get_contents("http://rss2json.com/api.json?rss_url=".urlencode($rssLink))); | |
//Using rss2json.com API | |
$i = 0; | |
foreach($RSSArr->items as $rssFeedObj){ | |
if($i < $PostLimit){ | |
echo "<a href='".$rssFeedObj->link."' target='_blank'><li>".$rssFeedObj->title."</li></a>"; | |
}else{ | |
break; | |
} | |
$i++; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment