/[LeafOK_CVS]/fenglin/ip_query/ip_list_trans.php
ViewVC logotype

Annotation of /fenglin/ip_query/ip_list_trans.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations)
Fri Sep 9 13:36:49 2005 UTC (20 years, 6 months ago) by sysadm
Branch: MAIN
CVS Tags: fenglin_1-0-0-0_MIL
no message

1 sysadm 1.1 <?
2     if (isset($_GET["begin"]))
3     $begin_ip=intval($_GET["begin"]);
4     else
5     $begin_ip=0;
6    
7     if ($begin_ip>=256)
8     exit();
9    
10     echo $begin_ip;
11    
12     $db_conn=include "./db_open.inc.php";
13     for ($i=$begin_ip;$i<$begin_ip+10;$i++)
14     {
15     if (!file_exists("./ip_list/$i.txt"))
16     continue;
17     $fp=fopen("./ip_list/".$i.".txt","r")
18     or die("File open error!");
19     while($line=fgets($fp,1024))
20     {
21     $ips = explode("__",$line);
22     mysql_query("insert delayed into ip_list(begin_ip,end_ip,address,area) ".
23     "values('".$ips[0]."','".$ips[1]."','".$ips[2]."','".$ips[3]."')")
24     or die("Add data error!");
25     // echo ($ips[0]." | ".$ips[1]." | ".$ips[2]." | ".$ips[3]."<br>\n");
26     }
27     fclose($fp);
28     }
29     mysql_close($db_conn);
30     ?>
31     <html>
32     <head>
33     <meta http-equiv="Refresh" content="0;url=ip_list_trans.php?begin=<? echo $i; ?>">
34     </head>
35     </html>

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