[ Index ] |
|
Code source de MagpieRSS 0.72 |
1 <?php 2 3 define('MAGPIE_DIR', '../'); 4 require_once (MAGPIE_DIR.'rss_fetch.inc'); 5 6 $url = $_GET['url']; 7 8 if ( $url ) { 9 $rss = fetch_rss( $url ); 10 echo "Channel: " . $rss->channel['title'] . "<p>"; 11 echo "<ul>"; 12 foreach ($rss->items as $item) { 13 $href = $item['link']; 14 $title = $item['title']; 15 echo "<li><a href=$href>$title</a></li>"; 16 } 17 echo "</ul>"; 18 } 19 ?> 20 21 <form> 22 RSS URL: <input type="text" size="30" name="url" value="<?php echo $url ?>"><br /> 23 <input type="submit" value="Parse RSS"> 24 </form> 25 26 <p> 27 <h2>Security Note:</h2> 28 This is a simple <b>example</b> script. If this was a <b>real</b> script we probably wouldn't allow strangers to submit random URLs, and we certainly wouldn't simply echo anything passed in the URL. Additionally its a bad idea to leave this example script lying around. 29 </p>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Fri Nov 30 19:16:52 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |