로또 분석기 소스입니다
본문
<?php
function _beBack ( $msg ) {
exit ("<body onload=\"alert('" . $msg . "');history.go(-1);\">");
}
function _getEven ( &$com, $num ) {
$com += $num % 2 ? 0 : 1;
}
$data = array(
71 => array(2,4,11,17,26,27,1),
70 => array(5,9,12,16,29,41,21),
69 => array(5,19,22,25,28,43,26),
68 => array(5,8,14,15,19,39,35),
67 => array(10,12,15,16,26,39,38),
66 => array(3,7,10,15,36,38,33),
65 => array(2,3,7,17,22,24,45),
64 => array(4,25,33,36,40,43,39),
63 => array(14,15,18,21,26,36,39),
62 => array(3,20,23,36,38,40,5),
61 => array(3,8,15,27,29,35,21),
60 => array(14,15,19,30,38,43,8),
59 => array(2,8,25,36,39,42,11),
58 => array(6,29,36,39,41,45,13),
57 => array(10,24,25,33,40,44,1),
56 => array(7,10,16,25,29,44,6),
55 => array(10,14,30,31,33,37,19),
54 => array(17,21,31,37,40,44,7),
53 => array(1,8,21,27,36,39,37),
52 => array(7,8,14,32,33,39,42),
51 => array(2,4,15,16,20,29,1),
50 => array(2,3,11,16,26,44,35),
49 => array(2,10,12,15,22,44,1),
48 => array(4,7,16,19,33,40,30),
47 => array(6,10,18,26,37,38,3),
46 => array(14,17,26,31,36,45,27),
45 => array(8,13,15,23,31,38,39),
44 => array(1,10,20,27,33,35,17),
43 => array(3,11,21,30,38,45,39),
42 => array(6,31,35,38,39,44,1),
41 => array(17,18,19,21,23,32,1),
40 => array(13,20,23,35,38,43,34),
39 => array(7,13,18,19,25,26,6),
38 => array(6,7,13,15,21,43,8),
37 => array(16,17,22,30,37,43,36),
36 => array(7,27,30,33,35,37,42),
35 => array(1,10,23,26,28,40,31),
34 => array(2,3,11,26,37,43,39),
33 => array(9,26,35,37,40,42,2),
32 => array(4,7,32,33,40,41,9),
31 => array(6,14,19,25,34,44,11),
30 => array(7,9,18,23,28,35,32),
29 => array(8,17,20,35,36,44,4),
28 => array(1,5,13,34,39,40,11),
27 => array(9,18,23,25,35,37,1),
26 => array(1,20,26,28,37,43,27),
25 => array(4,5,7,18,20,25,31),
24 => array(2,4,21,26,43,44,16),
23 => array(7,8,27,29,36,43,6),
22 => array(5,13,17,18,33,42,44),
21 => array(4,5,6,8,17,39,25),
20 => array(6,12,17,18,31,32,21),
19 => array(10,14,18,20,23,30,41),
18 => array(6,30,38,39,40,43,26),
17 => array(3,12,13,19,32,35,29),
16 => array(3,4,9,17,32,37,1),
15 => array(6,7,24,37,38,40,33),
14 => array(3,4,16,30,31,37,13),
13 => array(2,6,12,31,33,40,15),
12 => array(22,23,25,37,38,42,26),
11 => array(2,11,21,25,39,45,44),
10 => array(1,7,36,37,41,42,14),
9 => array(9,25,30,33,41,44,6),
8 => array(2,4,16,17,36,39,14),
7 => array(8,19,25,34,37,39,9),
6 => array(2,9,16,25,26,40,42),
5 => array(14,15,26,27,40,42,34),
4 => array(16,24,29,40,41,42,3),
3 => array(14,27,30,31,40,42,2),
2 => array(11,16,19,21,27,31,30),
1 => array(9,13,21,25,32,42,2),
0 => array(10,23,29,33,37,40,16)
);
$sdata = sizeof($data);
$begin = $_GET['begin'] ? $_GET['begin'] - 1 : 0;
$end = $_GET['end'] ? $_GET['end'] : $sdata;
$bonus = $_GET['bonus'];
$random = $_GET['random'];
if($begin >= $end) _beBack ("시작회차가 마지막회차 보다 커서는 안됩니다.");
if($begin < 0 OR $end > $sdata) _beBack ("회차를 임의로 변조하지 말아 주세요.");
$rata = $cnt = $snx = $bos = $ran = array();
for($td = $begin; $td < $end; $td++) {
for($i = 0; $i < 7; $i++) {
$rata[$td][$i] = $data[$td][$i];
if($i == 6 && !$bonus)
break;
$cnt[$data[$td][$i]]++;
$snx[$data[$td][$i]][$i]++;
$ran[] = $data[$td][$i];
}
$bos[$data[$td][6]]++;
}
krsort ($rata);
arsort ($cnt);
arsort ($bos);
krsort ($snx);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr" />
<title>로또 645</title>
<link rel='stylesheet' type='text/css' href="http://www6.jobkorea.co.kr/Css/Text_Folder.css" />
</head>
<body bgcolor='#ACAC88' topmargin='7' leftmargin='7'>
<table width='900' border='0' bgcolor='#FFFFFF' cellpadding='0' cellspacing='0'>
<tr height='26' bgcolor="#FFFFE0">
<td colspan='2'> 당첨되시면 msn 메신저 designcooler 골뱅이 hanmail.net 로 연락 주세요. - <a href="lotto.phps" target="_blank">소스</a></td>
<td colspan='2' align='right'><a href="http://validator.w3.org/check/referer" target="_blank">W3C(XHTML 1.0)</a> </td>
</tr>
<form name='name' method='get'>
<tr bgcolor='#D0D6DC'>
<td colspan='4' height='28'>
로또 645 제
<select name='begin'>
<?php
for($i = $sdata; $i > 0; $i--) {
$select = !$_GET['begin'] ? ($i == 1 ? ' SELECTED' : '') : ($_GET['begin'] == $i ? ' SELECTED' : '');
echo "<option value='" . $i . "'" . $select . ">" . sprintf("%02d", $i) . "</option>\n";
}
?>
</select> 회차부터 제
<select name='end'>
<?php
for($i = $sdata; $i > 0; $i--) {
$select = $_GET['end'] ? ($_GET['end'] == $i ? ' SELECTED' : '') : '';
echo "<option value='" . $i . "'" . $select . ">" . sprintf("%02d", $i) . "</option>\n";
}
?>
</select> 회차까지
<input type='checkbox' name='bonus' <?=$_GET['bonus'] ? ' CHECKED' : ''?> value='true' />
보너스번호포함
<input type='checkbox' name='random' <?=$_GET['random'] ? ' CHECKED' : ''?> value='true' />
랜덤번호생성
<input type='submit' value='통계검색' />
<?php
if($random) {
$even = 0;
$ran = array_unique ($ran);
sort ($ran);
shuffle ($ran);
for($i = 0; $i < 6; $i++) {
_getEven($even, $ran[$i]);
$dom[] = sprintf("%02d", $ran[$i]);
}
sort($dom);
echo " 랜덤번호: <font color='#18609C'>" .
$dom[0] . "-" . $dom[1] . "-" . $dom[2] . "-" . $dom[3] . "-" . $dom[4] . "-" . $dom[5] .
"</font> ( 번호총합: " .
array_sum ($dom) . " )" .
" ( 짝 : 홀 = " . $even . " : " . (6 - $even) . " )";
}
?>
</td>
</tr>
</form>
<tr>
<td width='450' align='center' valign='top' bgcolor='#CCCCCC'>
<table width='450' border='0' cellpadding='2' cellspacing='1'>
<tr align='center' bgcolor='#EFEFEF'>
<td>회차</td>
<td colspan='6'>당첨번호</td>
<td>번호총합</td>
<td>짝 : 홀</td>
<td>보너스숫자</td>
</tr>
<?php
foreach($rata AS $key => $val) {
$even = 0;
?>
<tr align='center' bgcolor='#FFFFFF'>
<td width='45' bgcolor='#F0F0F0'><?printf("%02d", $key+1)?></td>
<?php
for($i = 0; $i < 6; $i++) {
_getEven($even, $val[$i]);
?>
<td width='45'><?printf("%02d", $val[$i])?></td>
<?
}
?>
<td width='45'><?=array_sum ($val) - $val[6]?></td>
<td width='45'><?echo $even . " : " . (6 - $even)?></td>
<td width='45'><?printf("%02d", $val[6])?></td>
</tr>
<?php
}
?>
</table>
</td>
<td width='360' valign='top' bgcolor='#CCCCCC'>
<table width='<?= $bonus ? "360" : "315" ?>' border='0' cellpadding='2' cellspacing='1'>
<tr align='center' bgcolor='#EFEFEF'>
<td>당첨번호</td>
<td>첫째번호</td>
<td>둘째번호</td>
<td>셋째번호</td>
<td>넷째번호</td>
<td>다섯번호</td>
<td>여섯번호</td>
<? if($bonus) { ?><td>보너스번호</td><? } ?>
</tr>
<?php
foreach($snx AS $key => $val) {
?>
<tr align='center' bgcolor='#FFFFFF'>
<td width='45' bgcolor='#F0F0F0'><?printf("%02d", $key)?></td>
<?php
for($i = 0; $i < 7; $i++) {
if($i == 6 && !$bonus)
break;
?>
<td width='45'><?$val[$i] != 0 ? printf("%02d", $val[$i]) : ''?></td>
<?
}
?>
</tr>
<?php
}
?>
</table>
</td>
<td width='90' align='center' valign='top' bgcolor='#CCCCCC'>
<table width='90' border='0' cellpadding='2' cellspacing='1'>
<tr align='center' bgcolor='#EFEFEF'>
<td>당첨번호</td>
<td>당첨횟수</td>
</tr>
<?php
foreach($cnt AS $key => $val) {
?>
<tr align='center' bgcolor='#FFFFFF'>
<td width='45' bgcolor='#F0F0F0'><?printf("%02d", $key)?></td>
<td width='45'><?printf("%02d", $val)?></td>
</tr>
<?php
}
?>
</table>
</td>
<td width='90' align='center' valign='top' bgcolor='#CCCCCC'>
<table width='90' border='0' cellpadding='2' cellspacing='1'>
<tr align='center' bgcolor='#EFEFEF'>
<td>보너스번호</td>
<td>보너스횟수</td>
</tr>
<?php
foreach($bos AS $key => $val) {
?>
<tr align='center' bgcolor='#FFFFFF'>
<td width='45' bgcolor='#F0F0F0'><?printf("%02d", $key)?></td>
<td width='45'><?printf("%02d", $val)?></td>
</tr>
<?php
}
?>
</table>
</td>
</table>
</body>
</html>
출처 : http://www.aircon1004.com/data/bbs/board.php?bo_table=pds1&wr_id=185
function _beBack ( $msg ) {
exit ("<body onload=\"alert('" . $msg . "');history.go(-1);\">");
}
function _getEven ( &$com, $num ) {
$com += $num % 2 ? 0 : 1;
}
$data = array(
71 => array(2,4,11,17,26,27,1),
70 => array(5,9,12,16,29,41,21),
69 => array(5,19,22,25,28,43,26),
68 => array(5,8,14,15,19,39,35),
67 => array(10,12,15,16,26,39,38),
66 => array(3,7,10,15,36,38,33),
65 => array(2,3,7,17,22,24,45),
64 => array(4,25,33,36,40,43,39),
63 => array(14,15,18,21,26,36,39),
62 => array(3,20,23,36,38,40,5),
61 => array(3,8,15,27,29,35,21),
60 => array(14,15,19,30,38,43,8),
59 => array(2,8,25,36,39,42,11),
58 => array(6,29,36,39,41,45,13),
57 => array(10,24,25,33,40,44,1),
56 => array(7,10,16,25,29,44,6),
55 => array(10,14,30,31,33,37,19),
54 => array(17,21,31,37,40,44,7),
53 => array(1,8,21,27,36,39,37),
52 => array(7,8,14,32,33,39,42),
51 => array(2,4,15,16,20,29,1),
50 => array(2,3,11,16,26,44,35),
49 => array(2,10,12,15,22,44,1),
48 => array(4,7,16,19,33,40,30),
47 => array(6,10,18,26,37,38,3),
46 => array(14,17,26,31,36,45,27),
45 => array(8,13,15,23,31,38,39),
44 => array(1,10,20,27,33,35,17),
43 => array(3,11,21,30,38,45,39),
42 => array(6,31,35,38,39,44,1),
41 => array(17,18,19,21,23,32,1),
40 => array(13,20,23,35,38,43,34),
39 => array(7,13,18,19,25,26,6),
38 => array(6,7,13,15,21,43,8),
37 => array(16,17,22,30,37,43,36),
36 => array(7,27,30,33,35,37,42),
35 => array(1,10,23,26,28,40,31),
34 => array(2,3,11,26,37,43,39),
33 => array(9,26,35,37,40,42,2),
32 => array(4,7,32,33,40,41,9),
31 => array(6,14,19,25,34,44,11),
30 => array(7,9,18,23,28,35,32),
29 => array(8,17,20,35,36,44,4),
28 => array(1,5,13,34,39,40,11),
27 => array(9,18,23,25,35,37,1),
26 => array(1,20,26,28,37,43,27),
25 => array(4,5,7,18,20,25,31),
24 => array(2,4,21,26,43,44,16),
23 => array(7,8,27,29,36,43,6),
22 => array(5,13,17,18,33,42,44),
21 => array(4,5,6,8,17,39,25),
20 => array(6,12,17,18,31,32,21),
19 => array(10,14,18,20,23,30,41),
18 => array(6,30,38,39,40,43,26),
17 => array(3,12,13,19,32,35,29),
16 => array(3,4,9,17,32,37,1),
15 => array(6,7,24,37,38,40,33),
14 => array(3,4,16,30,31,37,13),
13 => array(2,6,12,31,33,40,15),
12 => array(22,23,25,37,38,42,26),
11 => array(2,11,21,25,39,45,44),
10 => array(1,7,36,37,41,42,14),
9 => array(9,25,30,33,41,44,6),
8 => array(2,4,16,17,36,39,14),
7 => array(8,19,25,34,37,39,9),
6 => array(2,9,16,25,26,40,42),
5 => array(14,15,26,27,40,42,34),
4 => array(16,24,29,40,41,42,3),
3 => array(14,27,30,31,40,42,2),
2 => array(11,16,19,21,27,31,30),
1 => array(9,13,21,25,32,42,2),
0 => array(10,23,29,33,37,40,16)
);
$sdata = sizeof($data);
$begin = $_GET['begin'] ? $_GET['begin'] - 1 : 0;
$end = $_GET['end'] ? $_GET['end'] : $sdata;
$bonus = $_GET['bonus'];
$random = $_GET['random'];
if($begin >= $end) _beBack ("시작회차가 마지막회차 보다 커서는 안됩니다.");
if($begin < 0 OR $end > $sdata) _beBack ("회차를 임의로 변조하지 말아 주세요.");
$rata = $cnt = $snx = $bos = $ran = array();
for($td = $begin; $td < $end; $td++) {
for($i = 0; $i < 7; $i++) {
$rata[$td][$i] = $data[$td][$i];
if($i == 6 && !$bonus)
break;
$cnt[$data[$td][$i]]++;
$snx[$data[$td][$i]][$i]++;
$ran[] = $data[$td][$i];
}
$bos[$data[$td][6]]++;
}
krsort ($rata);
arsort ($cnt);
arsort ($bos);
krsort ($snx);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr" />
<title>로또 645</title>
<link rel='stylesheet' type='text/css' href="http://www6.jobkorea.co.kr/Css/Text_Folder.css" />
</head>
<body bgcolor='#ACAC88' topmargin='7' leftmargin='7'>
<table width='900' border='0' bgcolor='#FFFFFF' cellpadding='0' cellspacing='0'>
<tr height='26' bgcolor="#FFFFE0">
<td colspan='2'> 당첨되시면 msn 메신저 designcooler 골뱅이 hanmail.net 로 연락 주세요. - <a href="lotto.phps" target="_blank">소스</a></td>
<td colspan='2' align='right'><a href="http://validator.w3.org/check/referer" target="_blank">W3C(XHTML 1.0)</a> </td>
</tr>
<form name='name' method='get'>
<tr bgcolor='#D0D6DC'>
<td colspan='4' height='28'>
로또 645 제
<select name='begin'>
<?php
for($i = $sdata; $i > 0; $i--) {
$select = !$_GET['begin'] ? ($i == 1 ? ' SELECTED' : '') : ($_GET['begin'] == $i ? ' SELECTED' : '');
echo "<option value='" . $i . "'" . $select . ">" . sprintf("%02d", $i) . "</option>\n";
}
?>
</select> 회차부터 제
<select name='end'>
<?php
for($i = $sdata; $i > 0; $i--) {
$select = $_GET['end'] ? ($_GET['end'] == $i ? ' SELECTED' : '') : '';
echo "<option value='" . $i . "'" . $select . ">" . sprintf("%02d", $i) . "</option>\n";
}
?>
</select> 회차까지
<input type='checkbox' name='bonus' <?=$_GET['bonus'] ? ' CHECKED' : ''?> value='true' />
보너스번호포함
<input type='checkbox' name='random' <?=$_GET['random'] ? ' CHECKED' : ''?> value='true' />
랜덤번호생성
<input type='submit' value='통계검색' />
<?php
if($random) {
$even = 0;
$ran = array_unique ($ran);
sort ($ran);
shuffle ($ran);
for($i = 0; $i < 6; $i++) {
_getEven($even, $ran[$i]);
$dom[] = sprintf("%02d", $ran[$i]);
}
sort($dom);
echo " 랜덤번호: <font color='#18609C'>" .
$dom[0] . "-" . $dom[1] . "-" . $dom[2] . "-" . $dom[3] . "-" . $dom[4] . "-" . $dom[5] .
"</font> ( 번호총합: " .
array_sum ($dom) . " )" .
" ( 짝 : 홀 = " . $even . " : " . (6 - $even) . " )";
}
?>
</td>
</tr>
</form>
<tr>
<td width='450' align='center' valign='top' bgcolor='#CCCCCC'>
<table width='450' border='0' cellpadding='2' cellspacing='1'>
<tr align='center' bgcolor='#EFEFEF'>
<td>회차</td>
<td colspan='6'>당첨번호</td>
<td>번호총합</td>
<td>짝 : 홀</td>
<td>보너스숫자</td>
</tr>
<?php
foreach($rata AS $key => $val) {
$even = 0;
?>
<tr align='center' bgcolor='#FFFFFF'>
<td width='45' bgcolor='#F0F0F0'><?printf("%02d", $key+1)?></td>
<?php
for($i = 0; $i < 6; $i++) {
_getEven($even, $val[$i]);
?>
<td width='45'><?printf("%02d", $val[$i])?></td>
<?
}
?>
<td width='45'><?=array_sum ($val) - $val[6]?></td>
<td width='45'><?echo $even . " : " . (6 - $even)?></td>
<td width='45'><?printf("%02d", $val[6])?></td>
</tr>
<?php
}
?>
</table>
</td>
<td width='360' valign='top' bgcolor='#CCCCCC'>
<table width='<?= $bonus ? "360" : "315" ?>' border='0' cellpadding='2' cellspacing='1'>
<tr align='center' bgcolor='#EFEFEF'>
<td>당첨번호</td>
<td>첫째번호</td>
<td>둘째번호</td>
<td>셋째번호</td>
<td>넷째번호</td>
<td>다섯번호</td>
<td>여섯번호</td>
<? if($bonus) { ?><td>보너스번호</td><? } ?>
</tr>
<?php
foreach($snx AS $key => $val) {
?>
<tr align='center' bgcolor='#FFFFFF'>
<td width='45' bgcolor='#F0F0F0'><?printf("%02d", $key)?></td>
<?php
for($i = 0; $i < 7; $i++) {
if($i == 6 && !$bonus)
break;
?>
<td width='45'><?$val[$i] != 0 ? printf("%02d", $val[$i]) : ''?></td>
<?
}
?>
</tr>
<?php
}
?>
</table>
</td>
<td width='90' align='center' valign='top' bgcolor='#CCCCCC'>
<table width='90' border='0' cellpadding='2' cellspacing='1'>
<tr align='center' bgcolor='#EFEFEF'>
<td>당첨번호</td>
<td>당첨횟수</td>
</tr>
<?php
foreach($cnt AS $key => $val) {
?>
<tr align='center' bgcolor='#FFFFFF'>
<td width='45' bgcolor='#F0F0F0'><?printf("%02d", $key)?></td>
<td width='45'><?printf("%02d", $val)?></td>
</tr>
<?php
}
?>
</table>
</td>
<td width='90' align='center' valign='top' bgcolor='#CCCCCC'>
<table width='90' border='0' cellpadding='2' cellspacing='1'>
<tr align='center' bgcolor='#EFEFEF'>
<td>보너스번호</td>
<td>보너스횟수</td>
</tr>
<?php
foreach($bos AS $key => $val) {
?>
<tr align='center' bgcolor='#FFFFFF'>
<td width='45' bgcolor='#F0F0F0'><?printf("%02d", $key)?></td>
<td width='45'><?printf("%02d", $val)?></td>
</tr>
<?php
}
?>
</table>
</td>
</table>
</body>
</html>
출처 : http://www.aircon1004.com/data/bbs/board.php?bo_table=pds1&wr_id=185
관련링크
댓글목록
등록된 댓글이 없습니다.