/[LeafOK_CVS]/fenglin/www/whereis.inc.php
ViewVC logotype

Annotation of /fenglin/www/whereis.inc.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Fri Mar 28 05:52:43 2025 UTC (11 months, 2 weeks ago) by sysadm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Remove legacy code

1 sysadm 1.1 <?
2     $depth = 0;
3     $nodes = array();
4     $ret = array();
5    
6     function startElement($parser, $name, $attrs)
7     {
8     global $depth;
9     global $nodes;
10     global $ret;
11    
12     $nodes[$depth++] = $name;
13    
14     $path = "";
15     for ($i=0;$i<$depth;$i++)
16     $path .= ("\\".$nodes[$i]);
17    
18     switch($path)
19     {
20     case "\ROOT\QUERY":
21     foreach($attrs as $k => $v)
22     {
23     switch($k)
24     {
25     case "IP":
26     $ret["address"] = $v;
27     break;
28     }
29     }
30     break;
31     case "\ROOT\RECORDS\RECORD":
32     foreach($attrs as $k => $v)
33     {
34     switch($k)
35     {
36     case "COUNTRY":
37     $ret["country"] = $v;
38     break;
39     case "LOCAL":
40     $ret["area"] = $v;
41     break;
42     }
43     }
44     break;
45     }
46     }
47    
48     function endElement($parser, $name)
49     {
50     global $depth;
51    
52     $depth--;
53     }
54     ?>

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1