i want creat the rss feed in this project

Discussion in 'PHP' started by kamakama, Jul 16, 2010.

  1. #1
    hello ,,

    please Scripts owned shortcut links with a description and title them and when I want to add any link appears in the rss feed Is the title or description

    what is the rss feed file Who will
     
    kamakama, Jul 16, 2010 IP
  2. Rainulf

    Rainulf Active Member

    Messages:
    373
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    85
    #2
    You make no sense man, but from my understanding, you want a script that grabs the RSS feed of some site, display the link appeared as its title of each entry. Try the following script:
    
    <?php
    
    header('Content-Type: text/html; charset=utf-8');
    
       function getFeed($feed_url, $posts_to_show) {
    	   try {
             $content = file_get_contents($feed_url);
    		   $x = new SimpleXmlElement($content);
    		
    		   echo "<ul>";
    		
    		   $i = 0;
    		   while ($i < $posts_to_show){
    			   echo "<li><a href=\"" . $x->channel->item[$i]->link . "\" title=\"" . $x->channel->item[$i]->title . "\" target=\"_blank\">" . $x->channel->item[$i]->title . "</a></li>";
    			   $i++;
    		   }
    		   echo "</ul>";
    	   }
    	   catch (Exception $e) {
    		   echo "<p>The blog feed doesn't seem to be available at the moment...</p>";
    	   }
       }
    
       getFeed("http://feeds.feedburner.com/TechCrunch", 15); // the first parameter is the URL to the RSS feed, the second is the num of post to show
    ?>
    
    PHP:
    Study this, this and that for reference.
     
    Rainulf, Jul 16, 2010 IP
  3. kamakama

    kamakama Active Member

    Messages:
    196
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    78
    #3
    thank you but ,,

    This is not
    I want to script or file .php upload on the site displays links to all the new links are added on the site
     
    kamakama, Jul 23, 2010 IP
  4. kamakama

    kamakama Active Member

    Messages:
    196
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    78
    #4
    help me please
     
    kamakama, Jul 24, 2010 IP