RSS订阅优然探索
你的位置:首页 » 技术文章 » 正文

测试手机号

选择字号: 超大 标准 发布时间:2011-8-29 13:14:50 | 作者:admin | 0个评论 | 人浏览

  protected void Page_Load(object sender, EventArgs e)
    {

        string sAdd = "186868";
        string sTmp = "";
        int j = 80000;
        for (int i = 0; i < 10000; i++)
        {
            j = 80000 + i;
            sTmp = sAdd + j.ToString();
            Phone(sTmp);
            //htm = htm&(i.ToString("0000")+"、"+sTmp+"<br>");
        }
    }


    protected void Phone(string sPhone)
    {
        string[] s = new string[6];
        s[1] = sPhone.Substring(6, 1);
        s[2] = sPhone.Substring(7, 1);
        s[3] = sPhone.Substring(8, 1);
        s[4] = sPhone.Substring(9, 1);
        s[5] = sPhone.Substring(10, 1);
        if (s[1] == s[2] && s[2] == s[3] && s[3] == s[4] && s[4] == s[5])
        {
            WriteInfo("1AAAAA," + sPhone);
        }
        else if ((s[1] == s[2] && s[2] == s[3] && s[3] == s[4]) || (s[2] == s[3] && s[3] == s[4] && s[4] == s[5]))
        {
            WriteInfo("2AAAA,"+sPhone);
        }
        else if ((s[1] == s[2] && s[2] == s[3]) || (s[2] == s[3] && s[3] == s[4]) || (s[3] == s[4] && s[4] == s[5]))
        {
            WriteInfo("3AAA," + sPhone);
        }
        else if ((s[1] == s[2] && s[3] == s[4]) || (s[2] == s[3] && s[4] == s[5]) )
        {
            WriteInfo("4AABB," + sPhone);
        }
        else if (Is68(s[2]) && Is68(s[3]) && Is68(s[4]) && Is68(s[5]))
        {
            WriteInfo("5末尾68," + sPhone);
        }

    }

    public bool Is68(string sInfo)
    {
        bool bReturn = false;
        if (sInfo == "6" || sInfo == "8")
        {
            bReturn = true;
        }
        return bReturn;
    }


    public int iNumber = 1;

    protected void WriteInfo(string sPhone)
    {
        htm = htm&(iNumber.ToString("0000")+","+sPhone + "<BR>");
        iNumber++;
    }

标签:

猜你喜欢

发表评论

必填

选填

选填

必填,不填不让过哦,嘻嘻。

记住我,下次回复时不用重新输入个人信息

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。