~yolanda.robla/ubuntu/saucy/nagios3/dep-8-tests

« back to all changes in this revision

Viewing changes to html/includes/rss/scripts/magpie_simple.php

  • Committer: Package Import Robot
  • Author(s): Alexander Wirt
  • Date: 2012-06-16 09:05:19 UTC
  • mfrom: (1.1.7)
  • Revision ID: package-import@ubuntu.com-20120616090519-ne14zejkhhyboolc
Tags: 3.4.1-1
* [28e077b] Imported Upstream version 3.3.1
* [d5314e0] don't call updatepo in clean target
* [45b3eb9] Don't remove config foo
* [54e3dff] Don't fix permissions in cgi postinst
* [d7be9db] Build-depend on libpng-dev (Closes: #662441)
* [4c47006] Add dutch po translation (Closes: #654855)
* [2b6573b] Refresh 10_p1_pl_shebang.dpatch
* [316fd7a] Update 40_fix_spurious_dollar_signs_added_to_command_lines
* [5ff2780] Refresh 55_strip_logarchivepath.dpatch
* [811d269] Refresh 60_fix_p1.pl_patch_mini_epn.dpatch
* [39a1e9c] Remove now unneeded patch 98_fix_XSS_CVE-2011-2179
* [785a4e8] Remove unneded patch 99_fix_XSS_CVE-2011-1523
* [6ce98ef] Remove unneeded patchs from 00list
* [1d18266] Imported Upstream version 3.4.0
* [05584c8] Refresh patches
* [58098cd] Imported Upstream version 3.4.1
* [3e9e07a] Bump standards version
* [fe991e2] wrap-and-sort
* [1ba78f7] Also create /var/run/nagios in cgi package (Closes: #626854)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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>
 
 
b'\\ No newline at end of file'