2 function get_data($item) {
3 $doc = new DOMDocument();
4 $doc->load('http://weather/weather/all-output.xml');
6 foreach ($doc->getElementsByTagName('weather') as $node) {
8 $item => $node->getElementsByTagName($item)->item(0)->nodeValue,
10 array_push($arrFeeds, $itemRSS);
15 function summon($person,$status) {
16 $myFile = "summon.txt";
17 $list = file("summon.txt");
18 $fh = fopen($myFile, 'w') or die("can't open file");
20 foreach ($list as $summoned) {
21 list($item,$flag) = split("=",trim($summoned));
22 if ($person == $item) {
23 fwrite($fh, "$person=$status\n");
26 if (strlen($item) > 0) {
27 fwrite($fh, "$item=$flag\n");
33 $fh = fopen($myFile, 'a') or die("can't open file");
34 fwrite($fh, "$person=$status\n");
39 function summon_status($person) {
40 $myFile = "summon.txt";
41 $list = file("summon.txt");
42 foreach ($list as $summoned) {
43 list($item,$flag) = split("=",$summoned);
44 if ($person == $item) {