Advertisement
Guest User

Untitled

a guest
Jan 5th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $words = array('поставя','темата', 'продавал'); // Allowed words
  2. $content = file_get_contents('https://www.wallflux.com/feed/101392669928073'); // Feed url
  3. $xml = new SimpleXmlElement($content);
  4. foreach($xml->channel->item as $row) {
  5.     foreach($words as $word) {
  6.         if(strpos($row->description, $word) !== false) {
  7.             /*
  8.             Check in DB from $row->pubDate
  9.             False = send email (url to post - $row->link), write on DB
  10.             True =  continue
  11.             */
  12.         }
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement