root/geowiki/getitem.rs.php

Revision 9, 0.7 kB (checked in by mikel, 3 years ago)

geowiki initial checkin

Line 
1 <?php
2 require("jsrsServer.php.inc");
3 include("shared.php");
4 //getitem($file, $uid)
5 jsrsDispatch("getitem");
6
7 //read xml-$file, extract the item with $uid and send it back
8 function getitem($file, $uid) {
9     $handle = fopen($file, "r");
10     $content = fread($handle, filesize($file));
11     fclose($handle);
12     
13     $startTag = "<item><guid>" . $uid . "</guid>";
14     $endTag = "</item>";
15 //    echo $content . ":" . $startTag . ":" . $endTag . ":\n";
16     $item = getContent($content, $startTag, $endTag);
17     
18
19 //    $returnString = implode("<separatorTag>", array('$title', '$url', '$desc', '$imgurl', '$tags', '$coords', '$geoType', '$user'));
20     $returnString = implode("<separatorTag>", xml2fields($item));
21     
22     return $returnString;
23 }
24
25 echo getitem("rss.xml", "Absolut");
26 ?>
27
Note: See TracBrowser for help on using the browser.