Last change
on this file since 12 was
12,
checked in by basvannuland, 14 years ago
|
Added RAP RDF API
Added RDF reader writer for save and load survey
|
File size:
839 bytes
|
Line | |
---|
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> |
---|
Note: See
TracBrowser
for help on using the repository browser.