topical media & game development 
  
 
 
 
 
  
    
    
  
 mashup-flickr-11-Step-3-lib-NewsItem.php / php
  <?php
  
  class NewsItem
  {        
    var keywords = null;
    var maxKeywords = 20;
  
    // Some common words to ignore
    var rssItem)
    {
      rssItem;
      url, this->photos, array('url' => link));
    }
  
    function getPhotos()
    {
      return this->rssItem['title'];
    }
  
    function getDescription()
    {
      return this->rssItem['link'];
    }
  
    function getKeywords()
    {
      if (s = this->getDescription();
        this->splitIntoWords(this->keywords = words);
      }
  
      return data)
    {
      // Remove any possessive apostrophes
      data); 
      // remove all except alphanumeric characters and spaces
      s); 
  
      return preg_split('/ +/', data)
    {
      data as word), this->isGoodKeyword(words, strtolower(words) >= words;
    }
  
    function isGoodKeyword(/', word), word))
      {
        return true;
      }
  
      // If it is more than five characters, it must be a good word
      if (strlen(
  
  
(C) Æliens 
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. 
In case of other copyright issues, contact the author.