//排除同号红球,并赋值functionnosame_ball($array){$a=mt_rand(1,33);if(!in_array($a,$array)){$value=$a;}else{$value=nosame_ball($array);}return$value;}//得到一组6个红球functionget_red_ball(){$arr[0]=mt_rand(1,33);if($arr[0]<10){$arr[0]="0".$arr[0];}$v=$arr[0];for($i=1;$i<6;$i++){$arr[$i]=nosame_ball($arr);if($arr[$i]<10){$arr[$i]="0".$arr[$i];}$v=$v.",".$arr[$i];}sort($arr);return$arr;}//显示函数//不带颜色functionshow_list(){$red_ball=get_red_ball();$red_c="";$len=count($red_ball);for($j=0;$j<$len;$j++){$red_c=$red_c.$red_ball[$j];if($j!=$len-1){$red_c=$red_c.",";}}return$red_c;}//带颜色functionshow_list_color(){echo"";$red_ball=get_red_ball();$len=count($red_ball);for($j=0;$j<$len;$j++){echo$red_ball[$j];if($j!=$len-1){echo",";}}echo"";}if(@$_POST['select_num']){$num=$_POST['select_num'];}else{$num=30000;}echo"随机选择了".$num."组
";$money=0;//赋值for($h=0;$h<$num;$h++){$blue_ball=mt_rand(1,16);if($blue_ball<10){$blue_ball="0".$blue_ball;}$hadd=$h+1;$r_b=show_list();$sort_list[$h]=$r_b;}//排序后显示sort($sort_list);$numall=count($sort_list);//定义自选红球$pd_1=show_list();//定义自选蓝球$my_blue_ball=mt_rand(1,16);if($my_blue_ball<10){$my_blue_ball="0".$my_blue_ball;}//echo"本次开奖号为 ".$pd_1."+".$my_blue_ball."
";//////////////////////////////////////////////////////////////////////////////////////////////$c1=explode(",",$pd_1);/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////$k=0;for($i=0;$i<$numall;$i++){if(@$_POST['blue_ball_post']){$blue_ball=$_POST['blue_ball_post'];if($blue_ball<10){$blue_ball="0".$blue_ball;}}else{$blue_ball=mt_rand(1,16);if($blue_ball<10){$blue_ball="0".$blue_ball;}}//判断相似度,是否中大奖$pd_own=$sort_list[$i]."+".$my_blue_ball;//////////////////////////////////////////////////////////////////////////////////////////////$c2=explode(",",$sort_list[$i]);/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////$h=count(array_intersect($c1,$c2));//数组中有几个相同值//similar_text($pd_1,$pd_own)if(($h>=4&&($my_blue_ball==$blue_ball))||$h>=5){//echo"".$sort_list[$i]."+".$blue_ball." ";$zhongjiang_list[$k]=$sort_list[$i]."+".$blue_ball;$k=$k+1;//200以上奖总金额统计if($h==4){$money=$money+200;}if($h==5&&($my_blue_ball!=$blue_ball)){$money=$money+200;}if($h==5&&($my_blue_ball==$blue_ball)){$money=$money+3000;}if($h==6&&($my_blue_ball!=$blue_ball)){$money=$money+300000;//echo"二等奖";}if($h==6&&($my_blue_ball==$blue_ball)){$money=$money+5000000;//echo"一等奖";}}else{//echo"".$sort_list[$i]."+".$blue_ball." ";if($h==4){$money=$money+10;}if($h==3&&($my_blue_ball==$blue_ball)){$money=$money+10;}if($h==2&&($my_blue_ball==$blue_ball)){$money=$money+5;}if($h==1&&($my_blue_ball==$blue_ball)){$money=$money+5;}}/*if(($i+1)%6==0){echo"
";}*/}//$my_blue_ball//$pd_1echo"
本次开奖号为".$pd_1."+".$my_blue_ball."
";echo"";echo"固定蓝球 ";echo"";for($value=1;$value<=16;$value++){if(@$_POST['blue_ball_post']){$ggg=$_POST['bl...