Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $feed_url="http://www.ezrss.it/feed/";
- $feed = simplexml_load_file($feed_url);
- include_once('includes/connection.php');
- include_once('includes/article.php');
- $article = new Article;
- $articles = $article->fetch_all();
- $query = $pdo->prepare("SELECT article_title FROM articles ORDER BY article_id DESC LIMIT 1");
- $query->execute();
- $title = $query->fetchColumn();
- $array = array();
- foreach($feed->channel as $item) {
- foreach($item->item as $info) {$array[] = array((string) $info->title, (string) $info->link);}
- }
- $add = false;
- foreach(array_reverse($array) as $key => $value) {
- if($add) {
- //add sql code
- }
- if($value[0] == $title) $add = true;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement