• 欢迎访问开心洋葱网站,在线教程,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站,欢迎加入开心洋葱 QQ群
  • 为方便开心洋葱网用户,开心洋葱官网已经开启复制功能!
  • 欢迎访问开心洋葱网站,手机也能访问哦~欢迎加入开心洋葱多维思维学习平台 QQ群
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏开心洋葱吧~~~~~~~~~~~~~!
  • 由于近期流量激增,小站的ECS没能经的起亲们的访问,本站依然没有盈利,如果各位看如果觉着文字不错,还请看官给小站打个赏~~~~~~~~~~~~~!

根据车管所的放出车牌好号段生成全部车牌号可筛选不带4

其他 开心洋葱 1587次浏览 0个评论

根据车管所的放出车牌好号段生成全部车牌号可筛选不带4

<?php
/**
 * Created by PhpStorm.
 * User: yang
 * Date: 2016/7/22
 *
 *
B0B0A1
B9C9Z9
 */
header("Content-type: text/html; charset=utf-8");
$not4 = $_GET['not4'];
$letter  = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','J','K','L','M','N','P','Q','R','S','T','U','V','W','X','Y','Z');
$letter_size = count($letter);

$not_have = array('4'); //不想包含的
$have = array('8','6','B','0','9','C');//必须包含的

$carno_1_begin = '0';
$carno_2_begin = 'B';
$carno_3_begin = '0';
$carno_4_begin = 'A';
$carno_5_begin = '1';

$carno_1_end = '9';
$carno_2_end = 'C';
$carno_3_end = '9';
$carno_4_end = 'Z';
$carno_5_end = '9';



$letter_size_1_begin = array_keys($letter,$carno_1_begin)[0];
$letter_size_2_begin = array_keys($letter,$carno_2_begin)[0];
$letter_size_3_begin = array_keys($letter,$carno_3_begin)[0];
$letter_size_4_begin = array_keys($letter,$carno_4_begin)[0];
$letter_size_5_begin = array_keys($letter,$carno_5_begin)[0];


$letter_size_1_end = array_keys($letter,$carno_1_end)[0];
$letter_size_2_end = array_keys($letter,$carno_2_end)[0];
$letter_size_3_end = array_keys($letter,$carno_3_end)[0];
$letter_size_4_end = array_keys($letter,$carno_4_end)[0];
$letter_size_5_end = array_keys($letter,$carno_5_end)[0];

echo '开始'.$letter[$letter_size_1_begin].$letter[$letter_size_2_begin].$letter[$letter_size_3_begin].$letter[$letter_size_4_begin].$letter[$letter_size_5_begin]."<br/>\r\n";
echo '结束'.$letter[$letter_size_1_end].$letter[$letter_size_2_end].$letter[$letter_size_3_end].$letter[$letter_size_4_end].$letter[$letter_size_5_end]."<br/>\r\n";
//$file  = 'log.csv';
//$hp = fopen($file,"a+");
$count = 0;
for($i_1=$letter_size_1_begin;$i_1<=$letter_size_1_end;$i_1++){
    for($i_2=$letter_size_2_begin;$i_2<=$letter_size_2_end;$i_2++){
        for($i_3=$letter_size_3_begin;$i_3<=$letter_size_3_end;$i_3++){
            for($i_4=$letter_size_4_begin;$i_4<=$letter_size_4_end;$i_4++){
                for($i_5=$letter_size_5_begin;$i_5<=$letter_size_5_end;$i_5++) {

                   // echo $i_1.'^'.$i_2.'^'.$i_3.'^'.$i_4.'^'.$i_5.'=';
                    $car_no[$count] = $letter[$i_1].$letter[$i_2].$letter[$i_3].$letter[$i_4].$letter[$i_5];
                    if($not4){
                        if(in_array($letter[$i_1],$not_have)) continue;
                        if(in_array($letter[$i_2],$not_have)) continue;
                        if(in_array($letter[$i_3],$not_have)) continue;
                        if(in_array($letter[$i_4],$not_have)) continue;
                        if(in_array($letter[$i_5],$not_have)) continue;

                        if(!in_array($letter[$i_1],$have)) continue;
                        if(!in_array($letter[$i_2],$have)) continue;
                        if(!in_array($letter[$i_3],$have)) continue;
                        if(!in_array($letter[$i_4],$have)) continue;
                        if(!in_array($letter[$i_5],$have)) continue;

                    }


                    if(false){
                        $content = $car_no[$count].",";
                        if($count % 26 ==0 ) $content.= "\r\n";
                        //if($f  = file_put_contents($file, $content,FILE_APPEND)){
                        //    echo "。<br />";
                        //}
                        fwrite($hp,$content);
                        echo '.';
                        $count++;
                        //if($count>5000) exit;
                    }else{
                        echo $car_no[$count].",";
                        $count++;
                        if($count % 26 ==0 ) echo "\r\n";
                        //if($count>10) exit;
                    }


                }
            }
        }
    }
}
//fclose($hp);
echo $count.'个,写入成功!';


开心洋葱 , 版权所有丨如未注明 , 均为原创丨未经授权请勿修改 , 转载请注明根据车管所的放出车牌好号段生成全部车牌号可筛选不带4
喜欢 (0)

您必须 登录 才能发表评论!

加载中……