更新2009年4月最新小灵通、一号通数据库

来自Jamesqi
跳转至: 导航搜索

--James Qi 2009年4月23日 (四) 13:57 (CST)

  昨天编程处理了最新手机号段数据后,经过一晚上不停机的导入,早上才将新增的手机归属数据全部添加到查号吧网站中。然后干脆一鼓作气把小灵通、一号通的数据也都处理了,2009年2月23日第一次导入了14,634条数据,3月份看好像没有特别更新就没有处理,这个月用程序处理后,发现有15,808条,比前次增加了1,174条。

  修改处理手机归属数据库的Visual Basic程序变成处理小灵通、一号通的程序也还费了一些时间,但总比第一次手工处理300多个文件快得多,因为小灵通停止放号,这个数据库的更新不久将会停止,这个程序也只能用几次了,但还是记录如下:

Sub Main()
    Const ForReading = 1, ForWriting = 2, ForAppending = 8
    Dim rootpath As String, province As String, file As String
    rootpath = "C:\Downloads\phs-txt\200904\小灵通数据库TXT版\"
'    Close #1
'    Open "c:\debug.txt" For Output As #1
'    Print #1, rootpath
'    Close #1
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f2 = fs.OpenTextFile("c:\temp.txt", ForWriting, True)
            f2.writeline ("start")
    f2.Close

province = "上海"
    file = "上海-021"
    Call OneFile(rootpath, province, file)
province = "云南"
    file = "临沧-0883"
    Call OneFile(rootpath, province, file)
    file = "丽江-0888"
    Call OneFile(rootpath, province, file)
    file = "保山-0875"
    Call OneFile(rootpath, province, file)
    file = "大理-0872"
    Call OneFile(rootpath, province, file)
    file = "德宏-0692"
    Call OneFile(rootpath, province, file)
    file = "思茅-0879"
    Call OneFile(rootpath, province, file)
    file = "文山-0876"
    Call OneFile(rootpath, province, file)
    file = "昆明-0871"
    Call OneFile(rootpath, province, file)
    file = "昭通-0870"
    Call OneFile(rootpath, province, file)
    file = "曲靖-0874"
    Call OneFile(rootpath, province, file)
    file = "楚雄-0878"
    Call OneFile(rootpath, province, file)
    file = "玉溪-0877"
    Call OneFile(rootpath, province, file)
    file = "红河-0873"
    Call OneFile(rootpath, province, file)
    file = "西双版纳-0691"
    Call OneFile(rootpath, province, file)
    file = "迪庆-0887"
    Call OneFile(rootpath, province, file)
province = "内蒙古"
    file = "乌兰察布盟-0474"
    Call OneFile(rootpath, province, file)
    file = "乌海-0473"
    Call OneFile(rootpath, province, file)
    file = "兴安盟-0482"
    Call OneFile(rootpath, province, file)
    file = "包头-0472"
    Call OneFile(rootpath, province, file)
    file = "呼和浩特-0471"
    Call OneFile(rootpath, province, file)
    file = "巴彦卓尔盟-0478"
    Call OneFile(rootpath, province, file)
    file = "海拉尔-0470"
    Call OneFile(rootpath, province, file)
    file = "赤峰-0476"
    Call OneFile(rootpath, province, file)
    file = "通辽-0475"
    Call OneFile(rootpath, province, file)
    file = "鄂尔多斯-0477"
    Call OneFile(rootpath, province, file)
    file = "锡林浩特-0479"
    Call OneFile(rootpath, province, file)
    file = "阿拉善盟-0483"
    Call OneFile(rootpath, province, file)
province = "北京"
    file = "北京-010"
    Call OneFile(rootpath, province, file)
province = "吉林"
    file = "吉林-0432"
    Call OneFile(rootpath, province, file)
    file = "四平-0434"
    Call OneFile(rootpath, province, file)
    file = "延边-0433"
    Call OneFile(rootpath, province, file)
    file = "松原-0438"
    Call OneFile(rootpath, province, file)
    file = "白城-0436"
    Call OneFile(rootpath, province, file)
    file = "白山-0439"
    Call OneFile(rootpath, province, file)
    file = "辽源-0437"
    Call OneFile(rootpath, province, file)
    file = "通化-0435"
    Call OneFile(rootpath, province, file)
    file = "长春-0431"
    Call OneFile(rootpath, province, file)
province = "四川"
    file = "乐山-0833"
    Call OneFile(rootpath, province, file)
    file = "南充-0817"
    Call OneFile(rootpath, province, file)
    file = "宜宾-0831"
    Call OneFile(rootpath, province, file)
    file = "巴中-0827"
    Call OneFile(rootpath, province, file)
    file = "广元-0839"
    Call OneFile(rootpath, province, file)
    file = "广安-0826"
    Call OneFile(rootpath, province, file)
    file = "德阳-0838"
    Call OneFile(rootpath, province, file)
    file = "成都-028"
    Call OneFile(rootpath, province, file)
    file = "攀枝花-0812"
    Call OneFile(rootpath, province, file)
    file = "泸州-0830"
    Call OneFile(rootpath, province, file)
    file = "甘孜-0836"
    Call OneFile(rootpath, province, file)
    file = "简阳-0832"
    Call OneFile(rootpath, province, file)
    file = "绵阳-0816"
    Call OneFile(rootpath, province, file)
    file = "自贡-0813"
    Call OneFile(rootpath, province, file)
    file = "西昌-0834"
    Call OneFile(rootpath, province, file)
    file = "达州-0818"
    Call OneFile(rootpath, province, file)
    file = "遂宁-0825"
    Call OneFile(rootpath, province, file)
    file = "阿坝-0837"
    Call OneFile(rootpath, province, file)
    file = "雅安-0835"
    Call OneFile(rootpath, province, file)
province = "天津"
    file = "天津-022"
    Call OneFile(rootpath, province, file)
province = "宁夏"
    file = "吴忠-0953"
    Call OneFile(rootpath, province, file)
    file = "固原-0954"
    Call OneFile(rootpath, province, file)
    file = "石嘴山-0952"
    Call OneFile(rootpath, province, file)
    file = "银川-0951"
    Call OneFile(rootpath, province, file)
province = "安徽"
    file = "亳州-0558"
    Call OneFile(rootpath, province, file)
    file = "六安-0564"
    Call OneFile(rootpath, province, file)
    file = "合肥-0551"
    Call OneFile(rootpath, province, file)
    file = "安庆-0556"
    Call OneFile(rootpath, province, file)
    file = "宿州-0557"
    Call OneFile(rootpath, province, file)
    file = "巢湖-0565"
    Call OneFile(rootpath, province, file)
    file = "池州-0566"
    Call OneFile(rootpath, province, file)
    file = "淮北-0561"
    Call OneFile(rootpath, province, file)
    file = "淮南-0554"
    Call OneFile(rootpath, province, file)
    file = "滁州-0550"
    Call OneFile(rootpath, province, file)
    file = "芜湖-0553"
    Call OneFile(rootpath, province, file)
    file = "蚌埠-0552"
    Call OneFile(rootpath, province, file)
    file = "铜陵-0562"
    Call OneFile(rootpath, province, file)
    file = "阜阳-0558"
    Call OneFile(rootpath, province, file)
    file = "马鞍山-0555"
    Call OneFile(rootpath, province, file)
province = "山东"
    file = "东营-0546"
    Call OneFile(rootpath, province, file)
    file = "临沂-0539"
    Call OneFile(rootpath, province, file)
    file = "威海-0631"
    Call OneFile(rootpath, province, file)
    file = "德州-0534"
    Call OneFile(rootpath, province, file)
    file = "日照-0633"
    Call OneFile(rootpath, province, file)
    file = "枣庄-0632"
    Call OneFile(rootpath, province, file)
    file = "泰安-0538"
    Call OneFile(rootpath, province, file)
    file = "济南-0531"
    Call OneFile(rootpath, province, file)
    file = "济宁-0537"
    Call OneFile(rootpath, province, file)
    file = "淄博-0533"
    Call OneFile(rootpath, province, file)
    file = "滨州-0543"
    Call OneFile(rootpath, province, file)
    file = "潍坊-0536"
    Call OneFile(rootpath, province, file)
    file = "烟台-0535"
    Call OneFile(rootpath, province, file)
    file = "聊城-0635"
    Call OneFile(rootpath, province, file)
    file = "莱芜-0634"
    Call OneFile(rootpath, province, file)
    file = "菏泽-0530"
    Call OneFile(rootpath, province, file)
    file = "青岛-0532"
    Call OneFile(rootpath, province, file)
province = "山西"
    file = "临汾-0357"
    Call OneFile(rootpath, province, file)
    file = "吕梁-0358"
    Call OneFile(rootpath, province, file)
    file = "大同-0352"
    Call OneFile(rootpath, province, file)
    file = "太原-0351"
    Call OneFile(rootpath, province, file)
    file = "忻州-0350"
    Call OneFile(rootpath, province, file)
    file = "晋中-0354"
    Call OneFile(rootpath, province, file)
    file = "晋城-0356"
    Call OneFile(rootpath, province, file)
    file = "朔州-0349"
    Call OneFile(rootpath, province, file)
    file = "运城-0359"
    Call OneFile(rootpath, province, file)
    file = "长治-0355"
    Call OneFile(rootpath, province, file)
    file = "阳泉-0353"
    Call OneFile(rootpath, province, file)
province = "广东"
    file = "东莞-0769"
    Call OneFile(rootpath, province, file)
    file = "中山-0760"
    Call OneFile(rootpath, province, file)
    file = "云浮-0766"
    Call OneFile(rootpath, province, file)
    file = "佛山-0757"
    Call OneFile(rootpath, province, file)
    file = "广州-020"
    Call OneFile(rootpath, province, file)
    file = "惠州-0752"
    Call OneFile(rootpath, province, file)
    file = "揭阳-0663"
    Call OneFile(rootpath, province, file)
    file = "梅州-0753"
    Call OneFile(rootpath, province, file)
    file = "汕头-0754"
    Call OneFile(rootpath, province, file)
    file = "汕尾-0660"
    Call OneFile(rootpath, province, file)
    file = "江门-0750"
    Call OneFile(rootpath, province, file)
    file = "河源-0762"
    Call OneFile(rootpath, province, file)
    file = "深圳-0755"
    Call OneFile(rootpath, province, file)
    file = "清远-0763"
    Call OneFile(rootpath, province, file)
    file = "湛江-0759"
    Call OneFile(rootpath, province, file)
    file = "潮州-0768"
    Call OneFile(rootpath, province, file)
    file = "珠海-0756"
    Call OneFile(rootpath, province, file)
    file = "肇庆-0758"
    Call OneFile(rootpath, province, file)
    file = "茂名-0668"
    Call OneFile(rootpath, province, file)
    file = "阳江-0662"
    Call OneFile(rootpath, province, file)
    file = "韶关-0751"
    Call OneFile(rootpath, province, file)
province = "广西"
    file = "北海-0779"
    Call OneFile(rootpath, province, file)
    file = "南宁-0771"
    Call OneFile(rootpath, province, file)
    file = "柳州-0772"
    Call OneFile(rootpath, province, file)
    file = "桂林-0773"
    Call OneFile(rootpath, province, file)
    file = "河池-0778"
    Call OneFile(rootpath, province, file)
    file = "百色-0776"
    Call OneFile(rootpath, province, file)
    file = "贵港-0775"
    Call OneFile(rootpath, province, file)
    file = "贺州-0774"
    Call OneFile(rootpath, province, file)
    file = "钦州-0777"
    Call OneFile(rootpath, province, file)
    file = "防城港-0770"
    Call OneFile(rootpath, province, file)
province = "新疆"
    file = "乌鲁木齐-0991"
    Call OneFile(rootpath, province, file)
    file = "伊犁-0999"
    Call OneFile(rootpath, province, file)
    file = "克拉玛依-0990"
    Call OneFile(rootpath, province, file)
    file = "博州-0909"
    Call OneFile(rootpath, province, file)
    file = "吐鲁番-0995"
    Call OneFile(rootpath, province, file)
    file = "和田-0903"
    Call OneFile(rootpath, province, file)
    file = "哈密-0902"
    Call OneFile(rootpath, province, file)
    file = "喀什-0998"
    Call OneFile(rootpath, province, file)
    file = "塔城-0901"
    Call OneFile(rootpath, province, file)
    file = "奎屯-0992"
    Call OneFile(rootpath, province, file)
    file = "库尔勒-0996"
    Call OneFile(rootpath, province, file)
    file = "昌吉-0994"
    Call OneFile(rootpath, province, file)
    file = "石河子-0993"
    Call OneFile(rootpath, province, file)
    file = "阿克苏-0997"
    Call OneFile(rootpath, province, file)
    file = "阿勒泰-0906"
    Call OneFile(rootpath, province, file)
province = "江苏"
    file = "南京-025"
    Call OneFile(rootpath, province, file)
    file = "南通-0513"
    Call OneFile(rootpath, province, file)
    file = "宿迁-0527"
    Call OneFile(rootpath, province, file)
    file = "常州-0519"
    Call OneFile(rootpath, province, file)
    file = "徐州-0516"
    Call OneFile(rootpath, province, file)
    file = "扬州-0514"
    Call OneFile(rootpath, province, file)
    file = "无锡-0510"
    Call OneFile(rootpath, province, file)
    file = "泰州-0523"
    Call OneFile(rootpath, province, file)
    file = "淮安-0517"
    Call OneFile(rootpath, province, file)
    file = "盐城-0515"
    Call OneFile(rootpath, province, file)
    file = "苏州-0512"
    Call OneFile(rootpath, province, file)
    file = "连云港-0518"
    Call OneFile(rootpath, province, file)
    file = "镇江-0511"
    Call OneFile(rootpath, province, file)
province = "江西"
    file = "上饶-0793"
    Call OneFile(rootpath, province, file)
    file = "九江-0792"
    Call OneFile(rootpath, province, file)
    file = "南昌-0791"
    Call OneFile(rootpath, province, file)
    file = "吉安-0796"
    Call OneFile(rootpath, province, file)
    file = "宜春-0795"
    Call OneFile(rootpath, province, file)
    file = "抚州-0794"
    Call OneFile(rootpath, province, file)
    file = "新余-0790"
    Call OneFile(rootpath, province, file)
    file = "景德镇-0798"
    Call OneFile(rootpath, province, file)
    file = "萍乡-0799"
    Call OneFile(rootpath, province, file)
    file = "赣州-0797"
    Call OneFile(rootpath, province, file)
    file = "鹰潭-0701"
    Call OneFile(rootpath, province, file)
province = "河北"
    file = "保定-0312"
    Call OneFile(rootpath, province, file)
    file = "唐山-0315"
    Call OneFile(rootpath, province, file)
    file = "廊坊-0316"
    Call OneFile(rootpath, province, file)
    file = "张家口-0313"
    Call OneFile(rootpath, province, file)
    file = "承德-0314"
    Call OneFile(rootpath, province, file)
    file = "沧州-0317"
    Call OneFile(rootpath, province, file)
    file = "石家庄-0311"
    Call OneFile(rootpath, province, file)
    file = "秦皇岛-0335"
    Call OneFile(rootpath, province, file)
    file = "衡水-0318"
    Call OneFile(rootpath, province, file)
    file = "邢台-0319"
    Call OneFile(rootpath, province, file)
    file = "邯郸-0310"
    Call OneFile(rootpath, province, file)
province = "河南"
    file = "三门峡-0398"
    Call OneFile(rootpath, province, file)
    file = "南阳-0377"
    Call OneFile(rootpath, province, file)
    file = "周口-0394"
    Call OneFile(rootpath, province, file)
    file = "商丘-0370"
    Call OneFile(rootpath, province, file)
    file = "安阳-0372"
    Call OneFile(rootpath, province, file)
    file = "平顶山-0375"
    Call OneFile(rootpath, province, file)
    file = "开封-0378"
    Call OneFile(rootpath, province, file)
    file = "新乡-0373"
    Call OneFile(rootpath, province, file)
    file = "洛阳-0379"
    Call OneFile(rootpath, province, file)
    file = "漯河-0395"
    Call OneFile(rootpath, province, file)
    file = "濮阳-0393"
    Call OneFile(rootpath, province, file)
    file = "焦作-0391"
    Call OneFile(rootpath, province, file)
    file = "郑州-0371"
    Call OneFile(rootpath, province, file)
    file = "驻马店-0396"
    Call OneFile(rootpath, province, file)
    file = "鹤壁-0392"
    Call OneFile(rootpath, province, file)
province = "浙江"
    file = "丽水-0578"
    Call OneFile(rootpath, province, file)
    file = "台州-0576"
    Call OneFile(rootpath, province, file)
    file = "嘉兴-0573"
    Call OneFile(rootpath, province, file)
    file = "宁波-0574"
    Call OneFile(rootpath, province, file)
    file = "杭州-0571"
    Call OneFile(rootpath, province, file)
    file = "温州-0577"
    Call OneFile(rootpath, province, file)
    file = "湖州-0572"
    Call OneFile(rootpath, province, file)
    file = "绍兴-0575"
    Call OneFile(rootpath, province, file)
    file = "舟山-0580"
    Call OneFile(rootpath, province, file)
    file = "衢州-0570"
    Call OneFile(rootpath, province, file)
    file = "金华-0579"
    Call OneFile(rootpath, province, file)
province = "海南"
    file = "海口-0898"
    Call OneFile(rootpath, province, file)
province = "湖北"
    file = "十堰-0719"
    Call OneFile(rootpath, province, file)
    file = "孝感-0712"
    Call OneFile(rootpath, province, file)
    file = "宜昌-0717"
    Call OneFile(rootpath, province, file)
    file = "恩施-0718"
    Call OneFile(rootpath, province, file)
    file = "武汉-027"
    Call OneFile(rootpath, province, file)
    file = "荆州-0716"
    Call OneFile(rootpath, province, file)
    file = "荆门-0724"
    Call OneFile(rootpath, province, file)
    file = "襄樊-0710"
    Call OneFile(rootpath, province, file)
    file = "鄂州-0711"
    Call OneFile(rootpath, province, file)
    file = "随州-0722"
    Call OneFile(rootpath, province, file)
    file = "黄冈-0713"
    Call OneFile(rootpath, province, file)
    file = "黄石-0714"
    Call OneFile(rootpath, province, file)
province = "湖南"
    file = "吉首-0743"
    Call OneFile(rootpath, province, file)
    file = "娄底-0738"
    Call OneFile(rootpath, province, file)
    file = "岳阳-0730"
    Call OneFile(rootpath, province, file)
    file = "常德-0736"
    Call OneFile(rootpath, province, file)
    file = "张家界-0744"
    Call OneFile(rootpath, province, file)
    file = "怀化-0745"
    Call OneFile(rootpath, province, file)
    file = "株洲-0733"
    Call OneFile(rootpath, province, file)
    file = "永州-0746"
    Call OneFile(rootpath, province, file)
    file = "湘潭-0732"
    Call OneFile(rootpath, province, file)
    file = "益阳-0737"
    Call OneFile(rootpath, province, file)
    file = "衡阳-0734"
    Call OneFile(rootpath, province, file)
    file = "邵阳-0739"
    Call OneFile(rootpath, province, file)
    file = "郴州-0735"
    Call OneFile(rootpath, province, file)
    file = "长沙-0731"
    Call OneFile(rootpath, province, file)
province = "甘肃"
    file = "兰州-0931"
    Call OneFile(rootpath, province, file)
    file = "嘉峪关-0937"
    Call OneFile(rootpath, province, file)
    file = "天水-0938"
    Call OneFile(rootpath, province, file)
    file = "定西-0932"
    Call OneFile(rootpath, province, file)
    file = "平凉-0933"
    Call OneFile(rootpath, province, file)
    file = "张掖-0936"
    Call OneFile(rootpath, province, file)
    file = "白银-0943"
    Call OneFile(rootpath, province, file)
    file = "金昌-0935"
    Call OneFile(rootpath, province, file)
    file = "陇南-0939"
    Call OneFile(rootpath, province, file)
province = "福建"
    file = "三明-0598"
    Call OneFile(rootpath, province, file)
    file = "南平-0599"
    Call OneFile(rootpath, province, file)
    file = "厦门-0592"
    Call OneFile(rootpath, province, file)
    file = "宁德-0593"
    Call OneFile(rootpath, province, file)
    file = "泉州-0595"
    Call OneFile(rootpath, province, file)
    file = "漳州-0596"
    Call OneFile(rootpath, province, file)
    file = "福州-0591"
    Call OneFile(rootpath, province, file)
    file = "莆田-0594"
    Call OneFile(rootpath, province, file)
    file = "龙岩-0597"
    Call OneFile(rootpath, province, file)
province = "西藏"
    file = "山南-0893"
    Call OneFile(rootpath, province, file)
    file = "拉萨-0891"
    Call OneFile(rootpath, province, file)
    file = "日喀则-0892"
    Call OneFile(rootpath, province, file)
    file = "阿里-0897"
    Call OneFile(rootpath, province, file)
province = "贵州"
    file = "六盘水-0858"
    Call OneFile(rootpath, province, file)
    file = "安顺-0853"
    Call OneFile(rootpath, province, file)
    file = "毕节-0857"
    Call OneFile(rootpath, province, file)
    file = "贵阳-0851"
    Call OneFile(rootpath, province, file)
    file = "遵义-0852"
    Call OneFile(rootpath, province, file)
    file = "都匀-0854"
    Call OneFile(rootpath, province, file)
    file = "铜仁-0856"
    Call OneFile(rootpath, province, file)
    file = "黔东南州-0855"
    Call OneFile(rootpath, province, file)
    file = "黔西南-0859"
    Call OneFile(rootpath, province, file)
province = "辽宁"
    file = "丹东-0415"
    Call OneFile(rootpath, province, file)
    file = "大连-0411"
    Call OneFile(rootpath, province, file)
    file = "抚顺-0413"
    Call OneFile(rootpath, province, file)
    file = "朝阳-0421"
    Call OneFile(rootpath, province, file)
    file = "本溪-0414"
    Call OneFile(rootpath, province, file)
    file = "沈阳-024"
    Call OneFile(rootpath, province, file)
    file = "盘锦-0427"
    Call OneFile(rootpath, province, file)
    file = "营口-0417"
    Call OneFile(rootpath, province, file)
    file = "葫芦岛-0429"
    Call OneFile(rootpath, province, file)
    file = "辽阳-0419"
    Call OneFile(rootpath, province, file)
    file = "铁岭-0410"
    Call OneFile(rootpath, province, file)
    file = "锦州-0416"
    Call OneFile(rootpath, province, file)
    file = "阜新-0418"
    Call OneFile(rootpath, province, file)
    file = "鞍山-0412"
    Call OneFile(rootpath, province, file)
province = "重庆"
    file = "重庆-023"
    Call OneFile(rootpath, province, file)
province = "陕西"
    file = "咸阳-029-06年并入西安"
    Call OneFile(rootpath, province, file)
    file = "商洛-0914"
    Call OneFile(rootpath, province, file)
    file = "安康-0915"
    Call OneFile(rootpath, province, file)
    file = "宝鸡-0917"
    Call OneFile(rootpath, province, file)
    file = "延安-0911"
    Call OneFile(rootpath, province, file)
    file = "榆林-0912"
    Call OneFile(rootpath, province, file)
    file = "汉中-0916"
    Call OneFile(rootpath, province, file)
    file = "渭南-0913"
    Call OneFile(rootpath, province, file)
    file = "西安-029"
    Call OneFile(rootpath, province, file)
    file = "铜川-0919"
    Call OneFile(rootpath, province, file)
province = "青海"
    file = "海东洲-0972"
    Call OneFile(rootpath, province, file)
    file = "海北州-0970"
    Call OneFile(rootpath, province, file)
    file = "海南州-0974"
    Call OneFile(rootpath, province, file)
    file = "海西州-0977"
    Call OneFile(rootpath, province, file)
    file = "玉树-0976"
    Call OneFile(rootpath, province, file)
    file = "西宁-0971"
    Call OneFile(rootpath, province, file)
    file = "黄南州-0973"
    Call OneFile(rootpath, province, file)
province = "香港一号通"
    file = "香港一号通"
    Call OneFile(rootpath, province, file)
province = "黑龙江"
    file = "七台河-0464"
    Call OneFile(rootpath, province, file)
    file = "伊春-0458"
    Call OneFile(rootpath, province, file)
    file = "佳木斯-0454"
    Call OneFile(rootpath, province, file)
    file = "双鸭山-0469"
    Call OneFile(rootpath, province, file)
    file = "哈尔滨-0451"
    Call OneFile(rootpath, province, file)
    file = "大兴安岭-0457"
    Call OneFile(rootpath, province, file)
    file = "大庆-0459"
    Call OneFile(rootpath, province, file)
    file = "牡丹江-0453"
    Call OneFile(rootpath, province, file)
    file = "绥化-0455"
    Call OneFile(rootpath, province, file)
    file = "鸡西-0467"
    Call OneFile(rootpath, province, file)
    file = "鹤岗-0468"
    Call OneFile(rootpath, province, file)
    file = "黑河-0456"
    Call OneFile(rootpath, province, file)
    file = "齐齐哈尔-0452"
    Call OneFile(rootpath, province, file)
End Sub

Sub OneFile(rootpath As String, province As String, file As String)
Const ForReading = 1, ForWriting = 2, ForAppending = 8
    Dim fs, f1, f2, l, s, e, c, w, i, city, code
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f1 = fs.OpenTextFile(rootpath + province + "\" + file + ".txt", ForReading)
    Set f2 = fs.OpenTextFile("c:\temp.txt", ForAppending, True)
    If file = "香港一号通" Then
        province = "香港"
        city = "香港"
        code = "00852"
    Else
    city = Mid(file, 1, InStr(file, "-") - 1)
    code = Mid(file, InStr(file, "-") + 1)
    If city = "金昌武威" Then
        city = "武威"
    End If
    If city = "酒泉嘉峪关" Then
        city = "嘉峪关"
    End If
    If city = "汕头潮阳" Then
        city = "潮阳"
    End If
    If city = "都匀(黔南)" Then
        city = "黔南"
    End If
    If city = "凯里(黔东南)" Then
        city = "黔东南"
    End If
    If city = "兴义(黔西南)" Then
        city = "黔西南"
    End If
    If city = "淮安淮阴" Then
        city = "淮阴"
    End If
    If city = "阿拉善盟" Then
        city = "阿拉善"
    End If
    If city = "巴彦卓尔盟" Then
        city = "巴彦卓尔"
    End If
    If city = "鄂尔多斯市伊克昭盟" Then
        city = "伊克昭"
    End If
    If city = "乌兰察布盟" Then
        city = "乌兰察布"
    End If
    If city = "海北州" Then
        city = "海北"
    End If
    If city = "海东州" Then
        city = "海东"
    End If
    If city = "海西州" Then
        city = "海西"
    End If
    If city = "黄南州" Then
        city = "黄南"
    End If
    If city = "江汉" Then
        city = "潜江"
    End If
    If city = "黔东南州" Then
        city = "黔东南"
    End If
    If city = "咸阳" Then
        city = "西安"
    End If
    If city = "海东洲" Then
        city = "海东"
    End If
    If city = "" Then
        city = ""
    End If
    If code = "029-06年并入西安" Then
        code = "029"
    End If
    End If

    Do While f1.AtEndOfStream <> True
        l = f1.readline
        If Not l = "" Then
        If Mid(l, 1, 1) = "1" Or Mid(l, 1, 1) = "2" Or Mid(l, 1, 1) = "3" Or Mid(l, 1, 1) = "4" Or Mid(l, 1, 1) = "5" Or Mid(l, 1, 1) = "6" Or Mid(l, 1, 1) = "7" Or Mid(l, 1, 1) = "8" Or Mid(l, 1, 1) = "9" Then
            w = "{{小灵通号段|" + province + "|" + city + "|" + code + "|" + Mid(l, 1, InStr(l, "x") - 1) + "|" + Mid(l, InStr(l, "x")) + "}}"
            w = "<title>" + code + Mid(l, 1, InStr(l, "x") - 1) + "</title>" + w
            w = Replace(w, "(小灵通)", "|一号通")
            w = Replace(w, "(一号通)", "|一号通")
            w = Replace(w, "(张家港一号通)", "|一号通")
            w = Replace(w, " ", "")
            w = Replace(w, " ", "")
            w = Replace(w, "    ", "")
            f2.writeline (w)
        End If
        End If
    Loop
    f1.Close
    f2.Close
End Sub

  同样地,这个程序就是进行一些文件字符串操作,只对我自己有用,别人估计都用不着。最新数据库也别找我要,因为是从别人那里拿的,承诺不传播。

  要去查询具体号码是否小灵通或者一号通还是很欢迎的,请点击进入:查号吧 - 小灵通一号通


  补充:2009年5月新数据15967条,比上月的15808条增加159条。用上面程序的处理速度飞快。Face-001.gif--James Qi 2009年5月18日 (一) 09:24 (CST)


  补充:2009年6月新数据16070条,比上月的15967条增加103条。因为小灵通已经不再放号,这个数据库以前每个月更新改为以后不定期更新。--James Qi 2009年6月18日 (四) 12:58 (CST)

标签:查号吧小灵通一号通Basic
相关内容:
  1. 2010-04-13 01:19:39 10种语言的国际区号查询网站
  2. 2010-04-02 00:38:01 用MediaWiki搭建多语言网站群框架
  3. 2010-03-31 17:15:10 长江日报关于“查号吧”的采访:武汉网民建网站揭电话诈骗 曝光骗子号码
  4. 2009-09-22 21:34:39 《南方周末》关注400电话诈骗现象,与我联系采访“查号吧”网站
  5. 2009-09-12 10:39:32 欢迎参加查号吧网站组织的曝光骗子号码“灭鼠计划”
  6. 2009-05-22 10:49:29 查号吧管理员工作统计
  7. 2009-05-09 23:23:46 为查号吧网站设立QQ群让网友自助交流
  8. 2009-04-22 23:07:37 更新2009年4月最新手机归属数据库
  9. 2009-04-17 11:34:53 电话查询、邮编查询网站提供搜索代码嵌入
  10. 2009-04-14 23:49:36 国外几个与电话号码相关的另类Wiki网站
  11. 2009-04-02 23:40:48 “查号吧”网站招聘兼职管理员
  12. 2009-03-02 14:34:09 新加入判断电话号码是小灵通还是固定电话座机的功能
  13. 2009-02-28 17:57:42 注册几个新的域名
  14. 2008-12-21 22:55:43 电话区号全面更新,新增手机号段数据

关于“更新2009年4月最新小灵通、一号通数据库”的留言:

目前暂无留言

新增相关留言