更新2009年4月最新手机归属数据库

来自Jamesqi
跳转至: 导航搜索

--James Qi 2009年4月22日 (四) 23:07 (CST)

  上周拿到2009年4月的最新手机归属数据库后一直没有对查号吧网站进行更新,原因是前几次的数据更新过程太痛苦了,先是手工处理300多个各地文件(这是最耗时的),再汇总整理,后续的上次、导入即使自动进行也需要好多天才能完成。

  想到以后每个月都要重复这个过程就头疼,下决心编个程序来处理,于是又操起了那个Office中的Visual Basic,花了几个小时编程、调试、修改,终于处理好了当月的166,444条数据(比3月的164,737条多出1,707条,去年12月15日我是导入的122,340条),关键是以后每个月只要运行这个程序,几分钟就可以处理完成,还是很有作用的,把这个蹩脚的程序记录下来:

Sub Main()
    Const ForReading = 1, ForWriting = 2, ForAppending = 8
    Dim rootpath As String, province As String, city As String
    rootpath = "C:\Downloads\手机号码段目录\"
'    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 = "上海"
'    city = "测试"
'    Call OneFile(rootpath, province, city)
    city = "上海"
    Call OneFile(rootpath, province, city)
province = "云南"
    city = "临沧"
    Call OneFile(rootpath, province, city)
    city = "丽江"
    Call OneFile(rootpath, province, city)
    city = "保山"
    Call OneFile(rootpath, province, city)
    city = "大理"
    Call OneFile(rootpath, province, city)
    city = "德宏"
    Call OneFile(rootpath, province, city)
    city = "怒江"
    Call OneFile(rootpath, province, city)
    city = "思茅"
    Call OneFile(rootpath, province, city)
    city = "文山"
    Call OneFile(rootpath, province, city)
    city = "昆明"
    Call OneFile(rootpath, province, city)
    city = "昭通"
    Call OneFile(rootpath, province, city)
    city = "曲靖"
    Call OneFile(rootpath, province, city)
    city = "楚雄"
    Call OneFile(rootpath, province, city)
    city = "玉溪"
    Call OneFile(rootpath, province, city)
    city = "红河"
    Call OneFile(rootpath, province, city)
    city = "西双版纳"
    Call OneFile(rootpath, province, city)
    city = "迪庆"
    Call OneFile(rootpath, province, city)
province = "内蒙古"
    city = "东胜"
    Call OneFile(rootpath, province, city)
    city = "临河"
    Call OneFile(rootpath, province, city)
    city = "乌兰察布盟"
    Call OneFile(rootpath, province, city)
    city = "乌兰浩特"
    Call OneFile(rootpath, province, city)
    city = "乌海"
    Call OneFile(rootpath, province, city)
    city = "兴安盟"
    Call OneFile(rootpath, province, city)
    city = "包头"
    Call OneFile(rootpath, province, city)
    city = "呼伦贝尔"
    Call OneFile(rootpath, province, city)
    city = "呼和浩特"
    Call OneFile(rootpath, province, city)
    city = "巴彦卓尔盟"
    Call OneFile(rootpath, province, city)
    city = "巴彦浩特"
    Call OneFile(rootpath, province, city)
    city = "海拉尔"
    Call OneFile(rootpath, province, city)
    city = "赤峰"
    Call OneFile(rootpath, province, city)
    city = "通辽"
    Call OneFile(rootpath, province, city)
    city = "鄂尔多斯"
    Call OneFile(rootpath, province, city)
    city = "鄂尔多斯市伊克昭盟"
    Call OneFile(rootpath, province, city)
    city = "锡林浩特"
    Call OneFile(rootpath, province, city)
    city = "阿拉善盟"
    Call OneFile(rootpath, province, city)
    city = "集宁"
    Call OneFile(rootpath, province, city)
province = "北京"
    city = "北京"
    Call OneFile(rootpath, province, city)
province = "吉林"
    city = "吉林"
    Call OneFile(rootpath, province, city)
    city = "四平"
    Call OneFile(rootpath, province, city)
    city = "延吉"
    Call OneFile(rootpath, province, city)
    city = "松原"
    Call OneFile(rootpath, province, city)
    city = "梅河口"
    Call OneFile(rootpath, province, city)
    city = "珲春"
    Call OneFile(rootpath, province, city)
    city = "白城"
    Call OneFile(rootpath, province, city)
    city = "白山"
    Call OneFile(rootpath, province, city)
    city = "辽源"
    Call OneFile(rootpath, province, city)
    city = "通化"
    Call OneFile(rootpath, province, city)
    city = "长春"
    Call OneFile(rootpath, province, city)
province = "四川"
    city = "乐山"
    Call OneFile(rootpath, province, city)
    city = "内江"
    Call OneFile(rootpath, province, city)
    city = "凉山"
    Call OneFile(rootpath, province, city)
    city = "南充"
    Call OneFile(rootpath, province, city)
    city = "宜宾"
    Call OneFile(rootpath, province, city)
    city = "巴中"
    Call OneFile(rootpath, province, city)
    city = "广元"
    Call OneFile(rootpath, province, city)
    city = "广安"
    Call OneFile(rootpath, province, city)
    city = "德阳"
    Call OneFile(rootpath, province, city)
    city = "成都"
    Call OneFile(rootpath, province, city)
    city = "攀枝花"
    Call OneFile(rootpath, province, city)
    city = "泸州"
    Call OneFile(rootpath, province, city)
    city = "甘孜"
    Call OneFile(rootpath, province, city)
    city = "眉山"
    Call OneFile(rootpath, province, city)
    city = "绵阳"
    Call OneFile(rootpath, province, city)
    city = "自贡"
    Call OneFile(rootpath, province, city)
    city = "西昌"
    Call OneFile(rootpath, province, city)
    city = "资阳"
    Call OneFile(rootpath, province, city)
    city = "达州"
    Call OneFile(rootpath, province, city)
    city = "遂宁"
    Call OneFile(rootpath, province, city)
    city = "阿坝"
    Call OneFile(rootpath, province, city)
    city = "雅安"
    Call OneFile(rootpath, province, city)
province = "天津"
    city = "天津"
    Call OneFile(rootpath, province, city)
province = "宁夏"
    city = "中卫"
    Call OneFile(rootpath, province, city)
    city = "吴忠"
    Call OneFile(rootpath, province, city)
    city = "固原"
    Call OneFile(rootpath, province, city)
    city = "石嘴山"
    Call OneFile(rootpath, province, city)
    city = "银川"
    Call OneFile(rootpath, province, city)
province = "安徽"
    city = "亳州"
    Call OneFile(rootpath, province, city)
    city = "六安"
    Call OneFile(rootpath, province, city)
    city = "合肥"
    Call OneFile(rootpath, province, city)
    city = "安庆"
    Call OneFile(rootpath, province, city)
    city = "宣城"
    Call OneFile(rootpath, province, city)
    city = "宿州"
    Call OneFile(rootpath, province, city)
    city = "巢湖"
    Call OneFile(rootpath, province, city)
    city = "池州"
    Call OneFile(rootpath, province, city)
    city = "淮北"
    Call OneFile(rootpath, province, city)
    city = "淮南"
    Call OneFile(rootpath, province, city)
    city = "滁州"
    Call OneFile(rootpath, province, city)
    city = "芜湖"
    Call OneFile(rootpath, province, city)
    city = "蚌埠"
    Call OneFile(rootpath, province, city)
    city = "铜陵"
    Call OneFile(rootpath, province, city)
    city = "阜阳"
    Call OneFile(rootpath, province, city)
    city = "马鞍山"
    Call OneFile(rootpath, province, city)
    city = "黄山"
    Call OneFile(rootpath, province, city)
province = "山东"
    city = "东营"
    Call OneFile(rootpath, province, city)
    city = "临沂"
    Call OneFile(rootpath, province, city)
    city = "威海"
    Call OneFile(rootpath, province, city)
    city = "德州"
    Call OneFile(rootpath, province, city)
    city = "日照"
    Call OneFile(rootpath, province, city)
    city = "枣庄"
    Call OneFile(rootpath, province, city)
    city = "泰安"
    Call OneFile(rootpath, province, city)
    city = "济南"
    Call OneFile(rootpath, province, city)
    city = "济宁"
    Call OneFile(rootpath, province, city)
    city = "淄博"
    Call OneFile(rootpath, province, city)
    city = "滨州"
    Call OneFile(rootpath, province, city)
    city = "潍坊"
    Call OneFile(rootpath, province, city)
    city = "烟台"
    Call OneFile(rootpath, province, city)
    city = "聊城"
    Call OneFile(rootpath, province, city)
    city = "莱芜"
    Call OneFile(rootpath, province, city)
    city = "菏泽"
    Call OneFile(rootpath, province, city)
    city = "青岛"
    Call OneFile(rootpath, province, city)
province = "山西"
    city = "临汾"
    Call OneFile(rootpath, province, city)
    city = "吕梁"
    Call OneFile(rootpath, province, city)
    city = "大同"
    Call OneFile(rootpath, province, city)
    city = "太原"
    Call OneFile(rootpath, province, city)
    city = "忻州"
    Call OneFile(rootpath, province, city)
    city = "晋中"
    Call OneFile(rootpath, province, city)
    city = "晋城"
    Call OneFile(rootpath, province, city)
    city = "朔州"
    Call OneFile(rootpath, province, city)
    city = "运城"
    Call OneFile(rootpath, province, city)
    city = "长治"
    Call OneFile(rootpath, province, city)
    city = "阳泉"
    Call OneFile(rootpath, province, city)
province = "广东"
    city = "东莞"
    Call OneFile(rootpath, province, city)
    city = "中山"
    Call OneFile(rootpath, province, city)
    city = "云浮"
    Call OneFile(rootpath, province, city)
    city = "佛山"
    Call OneFile(rootpath, province, city)
    city = "广州"
    Call OneFile(rootpath, province, city)
    city = "惠州"
    Call OneFile(rootpath, province, city)
    city = "揭阳"
    Call OneFile(rootpath, province, city)
    city = "梅州"
    Call OneFile(rootpath, province, city)
    city = "汕头"
    Call OneFile(rootpath, province, city)
    city = "汕头潮阳"
    Call OneFile(rootpath, province, city)
    city = "汕尾"
    Call OneFile(rootpath, province, city)
    city = "江门"
    Call OneFile(rootpath, province, city)
    city = "河源"
    Call OneFile(rootpath, province, city)
    city = "深圳"
    Call OneFile(rootpath, province, city)
    city = "清远"
    Call OneFile(rootpath, province, city)
    city = "湛江"
    Call OneFile(rootpath, province, city)
    city = "潮州"
    Call OneFile(rootpath, province, city)
    city = "珠海"
    Call OneFile(rootpath, province, city)
    city = "肇庆"
    Call OneFile(rootpath, province, city)
    city = "茂名"
    Call OneFile(rootpath, province, city)
    city = "阳江"
    Call OneFile(rootpath, province, city)
    city = "韶关"
    Call OneFile(rootpath, province, city)
province = "广西"
    city = "北海"
    Call OneFile(rootpath, province, city)
    city = "南宁"
    Call OneFile(rootpath, province, city)
    city = "来宾"
    Call OneFile(rootpath, province, city)
    city = "柳州"
    Call OneFile(rootpath, province, city)
    city = "桂林"
    Call OneFile(rootpath, province, city)
    city = "梧州"
    Call OneFile(rootpath, province, city)
    city = "河池"
    Call OneFile(rootpath, province, city)
    city = "玉林"
    Call OneFile(rootpath, province, city)
    city = "百色"
    Call OneFile(rootpath, province, city)
    city = "贵港"
    Call OneFile(rootpath, province, city)
    city = "贺州"
    Call OneFile(rootpath, province, city)
    city = "钦州"
    Call OneFile(rootpath, province, city)
    city = "防城港"
    Call OneFile(rootpath, province, city)
province = "新疆"
    city = "乌鲁木齐"
    Call OneFile(rootpath, province, city)
    city = "伊犁"
    Call OneFile(rootpath, province, city)
    city = "克州"
    Call OneFile(rootpath, province, city)
    city = "克拉玛依"
    Call OneFile(rootpath, province, city)
    city = "博乐"
    Call OneFile(rootpath, province, city)
    city = "吐鲁番"
    Call OneFile(rootpath, province, city)
    city = "和田"
    Call OneFile(rootpath, province, city)
    city = "哈密"
    Call OneFile(rootpath, province, city)
    city = "喀什"
    Call OneFile(rootpath, province, city)
    city = "塔城"
    Call OneFile(rootpath, province, city)
    city = "奎屯"
    Call OneFile(rootpath, province, city)
    city = "库尔勒"
    Call OneFile(rootpath, province, city)
    city = "昌吉"
    Call OneFile(rootpath, province, city)
    city = "石河子"
    Call OneFile(rootpath, province, city)
    city = "阿克苏"
    Call OneFile(rootpath, province, city)
    city = "阿勒泰"
    Call OneFile(rootpath, province, city)
    city = "阿图什"
    Call OneFile(rootpath, province, city)
province = "江苏"
    city = "南京"
    Call OneFile(rootpath, province, city)
    city = "南通"
    Call OneFile(rootpath, province, city)
    city = "宿迁"
    Call OneFile(rootpath, province, city)
    city = "常州"
    Call OneFile(rootpath, province, city)
    city = "徐州"
    Call OneFile(rootpath, province, city)
    city = "扬州"
    Call OneFile(rootpath, province, city)
    city = "无锡"
    Call OneFile(rootpath, province, city)
    city = "泰州"
    Call OneFile(rootpath, province, city)
    city = "淮安"
    Call OneFile(rootpath, province, city)
    city = "淮安淮阴"
    Call OneFile(rootpath, province, city)
    city = "盐城"
    Call OneFile(rootpath, province, city)
    city = "苏州"
    Call OneFile(rootpath, province, city)
    city = "连云港"
    Call OneFile(rootpath, province, city)
    city = "镇江"
    Call OneFile(rootpath, province, city)
province = "江西"
    city = "上饶"
    Call OneFile(rootpath, province, city)
    city = "九江"
    Call OneFile(rootpath, province, city)
    city = "南昌"
    Call OneFile(rootpath, province, city)
    city = "吉安"
    Call OneFile(rootpath, province, city)
    city = "宜春"
    Call OneFile(rootpath, province, city)
    city = "抚州"
    Call OneFile(rootpath, province, city)
    city = "新余"
    Call OneFile(rootpath, province, city)
    city = "景德镇"
    Call OneFile(rootpath, province, city)
    city = "萍乡"
    Call OneFile(rootpath, province, city)
    city = "赣州"
    Call OneFile(rootpath, province, city)
    city = "鹰潭"
    Call OneFile(rootpath, province, city)
province = "河北"
    city = "保定"
    Call OneFile(rootpath, province, city)
    city = "唐山"
    Call OneFile(rootpath, province, city)
    city = "廊坊"
    Call OneFile(rootpath, province, city)
    city = "张家口"
    Call OneFile(rootpath, province, city)
    city = "承德"
    Call OneFile(rootpath, province, city)
    city = "沧州"
    Call OneFile(rootpath, province, city)
    city = "石家庄"
    Call OneFile(rootpath, province, city)
    city = "秦皇岛"
    Call OneFile(rootpath, province, city)
    city = "衡水"
    Call OneFile(rootpath, province, city)
    city = "邢台"
    Call OneFile(rootpath, province, city)
    city = "邯郸"
    Call OneFile(rootpath, province, city)
province = "河南"
    city = "三门峡"
    Call OneFile(rootpath, province, city)
    city = "信阳"
    Call OneFile(rootpath, province, city)
    city = "南阳"
    Call OneFile(rootpath, province, city)
    city = "周口"
    Call OneFile(rootpath, province, city)
    city = "商丘"
    Call OneFile(rootpath, province, city)
    city = "安阳"
    Call OneFile(rootpath, province, city)
    city = "平顶山"
    Call OneFile(rootpath, province, city)
    city = "开封"
    Call OneFile(rootpath, province, city)
    city = "新乡"
    Call OneFile(rootpath, province, city)
    city = "洛阳"
    Call OneFile(rootpath, province, city)
    city = "漯河"
    Call OneFile(rootpath, province, city)
    city = "潢川"
    Call OneFile(rootpath, province, city)
    city = "濮阳"
    Call OneFile(rootpath, province, city)
    city = "焦作"
    Call OneFile(rootpath, province, city)
    city = "许昌"
    Call OneFile(rootpath, province, city)
    city = "郑州"
    Call OneFile(rootpath, province, city)
    city = "驻马店"
    Call OneFile(rootpath, province, city)
    city = "鹤壁"
    Call OneFile(rootpath, province, city)
province = "浙江"
    city = "丽水"
    Call OneFile(rootpath, province, city)
    city = "台州"
    Call OneFile(rootpath, province, city)
    city = "嘉兴"
    Call OneFile(rootpath, province, city)
    city = "宁波"
    Call OneFile(rootpath, province, city)
    city = "杭州"
    Call OneFile(rootpath, province, city)
    city = "温州"
    Call OneFile(rootpath, province, city)
    city = "湖州"
    Call OneFile(rootpath, province, city)
    city = "绍兴"
    Call OneFile(rootpath, province, city)
    city = "舟山"
    Call OneFile(rootpath, province, city)
    city = "衢州"
    Call OneFile(rootpath, province, city)
    city = "金华"
    Call OneFile(rootpath, province, city)
province = "海南"
    city = "三亚"
    Call OneFile(rootpath, province, city)
    city = "海口"
    Call OneFile(rootpath, province, city)
province = "湖北"
    city = "仙桃"
    Call OneFile(rootpath, province, city)
    city = "十堰"
    Call OneFile(rootpath, province, city)
    city = "咸宁"
    Call OneFile(rootpath, province, city)
    city = "天门"
    Call OneFile(rootpath, province, city)
    city = "孝感"
    Call OneFile(rootpath, province, city)
    city = "宜昌"
    Call OneFile(rootpath, province, city)
    city = "恩施"
    Call OneFile(rootpath, province, city)
    city = "武汉"
    Call OneFile(rootpath, province, city)
    city = "江汉"
    Call OneFile(rootpath, province, city)
    city = "荆州"
    Call OneFile(rootpath, province, city)
    city = "荆门"
    Call OneFile(rootpath, province, city)
    city = "襄樊"
    Call OneFile(rootpath, province, city)
    city = "鄂州"
    Call OneFile(rootpath, province, city)
    city = "随州"
    Call OneFile(rootpath, province, city)
    city = "黄冈"
    Call OneFile(rootpath, province, city)
    city = "黄石"
    Call OneFile(rootpath, province, city)
province = "湖南"
    city = "吉首"
    Call OneFile(rootpath, province, city)
    city = "娄底"
    Call OneFile(rootpath, province, city)
    city = "岳阳"
    Call OneFile(rootpath, province, city)
    city = "常德"
    Call OneFile(rootpath, province, city)
    city = "张家界"
    Call OneFile(rootpath, province, city)
    city = "怀化"
    Call OneFile(rootpath, province, city)
    city = "株洲"
    Call OneFile(rootpath, province, city)
    city = "永州"
    Call OneFile(rootpath, province, city)
    city = "湘潭"
    Call OneFile(rootpath, province, city)
    city = "益阳"
    Call OneFile(rootpath, province, city)
    city = "衡阳"
    Call OneFile(rootpath, province, city)
    city = "邵阳"
    Call OneFile(rootpath, province, city)
    city = "郴州"
    Call OneFile(rootpath, province, city)
    city = "长沙"
    Call OneFile(rootpath, province, city)
province = "甘肃"
    city = "临夏"
    Call OneFile(rootpath, province, city)
    city = "兰州"
    Call OneFile(rootpath, province, city)
    city = "天水"
    Call OneFile(rootpath, province, city)
    city = "定西"
    Call OneFile(rootpath, province, city)
    city = "平凉"
    Call OneFile(rootpath, province, city)
    city = "庆阳"
    Call OneFile(rootpath, province, city)
    city = "张掖"
    Call OneFile(rootpath, province, city)
    city = "甘南"
    Call OneFile(rootpath, province, city)
    city = "白银"
    Call OneFile(rootpath, province, city)
    city = "酒泉"
    Call OneFile(rootpath, province, city)
    city = "酒泉嘉峪关"
    Call OneFile(rootpath, province, city)
    city = "金昌"
    Call OneFile(rootpath, province, city)
    city = "金昌武威"
    Call OneFile(rootpath, province, city)
    city = "陇南"
    Call OneFile(rootpath, province, city)
province = "福建"
    city = "三明"
    Call OneFile(rootpath, province, city)
    city = "南平"
    Call OneFile(rootpath, province, city)
    city = "厦门"
    Call OneFile(rootpath, province, city)
    city = "宁德"
    Call OneFile(rootpath, province, city)
    city = "泉州"
    Call OneFile(rootpath, province, city)
    city = "漳州"
    Call OneFile(rootpath, province, city)
    city = "福州"
    Call OneFile(rootpath, province, city)
    city = "莆田"
    Call OneFile(rootpath, province, city)
    city = "龙岩"
    Call OneFile(rootpath, province, city)
province = "西藏"
    city = "山南"
    Call OneFile(rootpath, province, city)
    city = "拉萨"
    Call OneFile(rootpath, province, city)
    city = "日喀则"
    Call OneFile(rootpath, province, city)
    city = "昌都"
    Call OneFile(rootpath, province, city)
    city = "林芝"
    Call OneFile(rootpath, province, city)
    city = "那曲"
    Call OneFile(rootpath, province, city)
    city = "阿里"
    Call OneFile(rootpath, province, city)
province = "贵州"
    city = "六盘水"
    Call OneFile(rootpath, province, city)
    city = "兴义(黔西南)"
    Call OneFile(rootpath, province, city)
    city = "凯里(黔东南)"
    Call OneFile(rootpath, province, city)
    city = "安顺"
    Call OneFile(rootpath, province, city)
    city = "毕节"
    Call OneFile(rootpath, province, city)
    city = "贵阳"
    Call OneFile(rootpath, province, city)
    city = "遵义"
    Call OneFile(rootpath, province, city)
    city = "都匀(黔南)"
    Call OneFile(rootpath, province, city)
    city = "铜仁"
    Call OneFile(rootpath, province, city)
province = "辽宁"
    city = "丹东"
    Call OneFile(rootpath, province, city)
    city = "大连"
    Call OneFile(rootpath, province, city)
    city = "抚顺"
    Call OneFile(rootpath, province, city)
    city = "朝阳"
    Call OneFile(rootpath, province, city)
    city = "本溪"
    Call OneFile(rootpath, province, city)
    city = "沈阳"
    Call OneFile(rootpath, province, city)
    city = "盘锦"
    Call OneFile(rootpath, province, city)
    city = "营口"
    Call OneFile(rootpath, province, city)
    city = "葫芦岛"
    Call OneFile(rootpath, province, city)
    city = "辽阳"
    Call OneFile(rootpath, province, city)
    city = "铁岭"
    Call OneFile(rootpath, province, city)
    city = "锦州"
    Call OneFile(rootpath, province, city)
    city = "阜新"
    Call OneFile(rootpath, province, city)
    city = "鞍山"
    Call OneFile(rootpath, province, city)
province = "重庆"
    city = "万州"
    Call OneFile(rootpath, province, city)
    city = "涪陵"
    Call OneFile(rootpath, province, city)
    city = "重庆"
    Call OneFile(rootpath, province, city)
    city = "黔江"
    Call OneFile(rootpath, province, city)
province = "陕西"
    city = "咸阳"
    Call OneFile(rootpath, province, city)
    city = "商洛"
    Call OneFile(rootpath, province, city)
    city = "安康"
    Call OneFile(rootpath, province, city)
    city = "宝鸡"
    Call OneFile(rootpath, province, city)
    city = "延安"
    Call OneFile(rootpath, province, city)
    city = "榆林"
    Call OneFile(rootpath, province, city)
    city = "汉中"
    Call OneFile(rootpath, province, city)
    city = "渭南"
    Call OneFile(rootpath, province, city)
    city = "西安"
    Call OneFile(rootpath, province, city)
    city = "铜川"
    Call OneFile(rootpath, province, city)
province = "青海"
    city = "共和"
    Call OneFile(rootpath, province, city)
    city = "德令哈"
    Call OneFile(rootpath, province, city)
    city = "果洛"
    Call OneFile(rootpath, province, city)
    city = "格尔木"
    Call OneFile(rootpath, province, city)
    city = "海东州"
    Call OneFile(rootpath, province, city)
    city = "海北州"
    Call OneFile(rootpath, province, city)
    city = "海南州"
    Call OneFile(rootpath, province, city)
    city = "海晏"
    Call OneFile(rootpath, province, city)
    city = "海西州"
    Call OneFile(rootpath, province, city)
    city = "玉树"
    Call OneFile(rootpath, province, city)
    city = "西宁"
    Call OneFile(rootpath, province, city)
    city = "黄南州"
    Call OneFile(rootpath, province, city)
province = "黑龙江"
    city = "七台河"
    Call OneFile(rootpath, province, city)
    city = "伊春"
    Call OneFile(rootpath, province, city)
    city = "佳木斯"
    Call OneFile(rootpath, province, city)
    city = "双鸭山"
    Call OneFile(rootpath, province, city)
    city = "哈尔滨"
    Call OneFile(rootpath, province, city)
    city = "大兴安岭"
    Call OneFile(rootpath, province, city)
    city = "大庆"
    Call OneFile(rootpath, province, city)
    city = "牡丹江"
    Call OneFile(rootpath, province, city)
    city = "绥化"
    Call OneFile(rootpath, province, city)
    city = "鸡西"
    Call OneFile(rootpath, province, city)
    city = "鹤岗"
    Call OneFile(rootpath, province, city)
    city = "黑河"
    Call OneFile(rootpath, province, city)
    city = "齐齐哈尔"
    Call OneFile(rootpath, province, city)
End Sub

Sub OneFile(rootpath As String, province As String, city As String)
Const ForReading = 1, ForWriting = 2, ForAppending = 8
    Dim fs, f1, f2, l, s, e, c, w, i
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f1 = fs.OpenTextFile(rootpath + province + "\" + city + ".txt", ForReading)
    Set f2 = fs.OpenTextFile("c:\temp.txt", ForAppending, True)
    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
    Do While f1.AtEndOfStream <> True
        l = f1.readline
        If Not l = "" Then
        If Mid(l, 1, 2) = "13" Or Mid(l, 1, 2) = "15" Or Mid(l, 1, 2) = "18" Then

            s = Mid(l, 1, 7)
            e = Mid(l, 13 + Len(province), 2)
            c = Mid(l, 13 + Len(province) + 2)
                        
            w = s + "|" + city + "|" + province + "|" + e + "|" + c
            w = "{{手机七位|" + Trim(w) + "}}"
            w = "<title>" + s + "</title>" + w
            
            f2.writeline (w)
        End If
        End If
    Loop
    f1.Close
    f2.Close
End Sub

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

  要去查询具体手机归属还是很欢迎的Face-001.gif,请点击进入:查号吧 - 手机归属


  补充:2009年5月数据168324条,比上月的166444条增加1880条,使用以上程序几分钟就处理好了基本数据。--James Qi 2009年5月18日 (一) 09:31 (CST)


  补充:2009年6月新收据170913条,比上月的168324条增加2589条。本月准备删除2008年12月15日导入的没有卡型号的老数据,导入新数据,另外新增7位号段的分类页面。--James Qi 2009年6月18日 (四) 13:38 (CST)


  补充:2009年7月新数据172405条,比上月的170913条增加1492条。程序中的地区名称变化做了小的修改。本月小灵通/一号通数据未更新。--James Qi 2009年7月16日 (四) 23:03 (CST)


  补充:2009年8月新数据174399条,比上月的172405条增加1994条。因为密码发到垃圾邮件文件夹中去了,本月更新较晚。本月小灵通/一号通数据未更新。--James Qi 2009年8月24日 (一) 23:19 (CST)


  补充:2009年9月新数据175813条,比上月的174399条增加1414条。小灵通数据未更新。--James Qi 2009年9月13日 (日) 22:15 (CST)


  补充:2009年10月新数据178006条,比上月的174399条增加2193条。小灵通数据未更新。--James Qi 2009年10月11日 (日) 23:58 (CST)


  补充:2009年11月新数据179554条,比上月的178006条增加1548条。小灵通数据未更新。--James Qi 2009年11月12日 (四) 12:45 (CST)


  补充:2009年12月新数据180034条,比上月的179554条增加480条。小灵通数据未更新。--James Qi 2009年12月11日 (五) 11:32 (CST)


  补充:2010年1月新数据180444条,比上月的180034条增加410条。小灵通数据未更新。--James Qi 2010年1月16日 (六) 17:54 (CST)


  补充:2010年2月新数据183003条,比上月的180444条增加2559条。小灵通数据未更新。--James Qi 2010年2月24日 (三) 15:35 (CST)


  补充:2010年3月新数据185175条,比上月的183003条增加2172条。小灵通数据未更新,准备补充导入分类页面,但发现MediaWiki从2009年12月升级到1.15.0后,每个月重复导入了大量页面,不敢继续导入,下个月开始需要重新检查导入方式,还要设法清理重复。--James Qi 2010年3月14日 (日) 22:36 (CST)


  补充:2010年4月新数据188257条,比上月的185175条增加3082条。小灵通数据未更新。用UltraCompare比较两个月的差异,查出新数据中有3389条差异(大部分是新增,少量是修改),只将这些有差异的数据导入(导入日期依然写2008-12-15)。--James Qi 2010年5月4日 (二) 15:25 (CST)


2010年5月数据库损坏,花了10多天恢复,没有进行号段新数据导入,待下个月一起补充。


  补充:2010年6月新数据193413条,比4月的188257条增加5156条。小灵通数据未更新。用UltraCompare比较两个月的差异,查出新数据中有5292条差异(大部分是新增,少量是修改),只将这些有差异的数据导入(导入日期依然写2008-12-15)。--James Qi 2010年6月13日 (日) 14:38 (CST)


  补充:2010年7月新数据2847条(与6月比较的新增和更改项),2010年8月新数据2656条(与7月比较的新增和更改项),已经分别在7月20日和8月16日导入。--James Qi 2010年8月16日 (一) 22:42 (CST)


  补充:2010年8月新数据1246条(与7月比较的新增和更改项),已经在9月20日导入。--James Qi 2010年9月20日 (一) 13:47 (CST)


  补充:2010年9月新数据3299条(与8月比较的新增和更改项),10月20日开始导入。--James Qi 2010年10月20日 (三) 09:17 (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-23 13:57:03 更新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月最新手机归属数据库”的留言:

目前暂无留言

新增相关留言