- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
$r1=mt_rand(0,9);
$r2=mt_rand(0,9);
$r3=mt_rand(0,9);
$r4=mt_rand(0,9);
$r5=mt_rand(0,9);
$r6=mt_rand(0,9);
$r7=mt_rand(0,9);
$r8=mt_rand(0,9);
$r9=mt_rand(0,9);
$result=$id.$r1.$r2.$r3.$r4.$r5.$r6.$r7.$r8.$r9;
print $notvalid.$result;
$rest1=substr($result,0,-14);
$rest2=substr($result,2,-12);
$rest3=substr($result,4,-10);
$rest4=substr($result,6,-8);
$rest5=substr($result,8,-6);
$rest6=substr($result,10,-4);
$rest7=substr($result,12,-2);
$rest8=substr($result,-1);
$ddos1=substr($result,1,-13);
$ddos2=substr($result,3,-11);
$ddos3=substr($result,5,-9);
$ddos4=substr($result,7,-7);
$ddos5=substr($result,9,-5);
$ddos6=substr($result,11,-3);
$ddos7=substr($result,13,-1);
$dos1=$rest1*2;
$dos2=$rest2*2;
$dos3=$rest3*2;
$dos4=$rest4*2;
$dos5=$rest5*2;
$dos6=$rest6*2;
$dos7=$rest7*2;
$dos8=$rest8*2;
if ($dos1>=10) {
$doss1=$dos1-9;
} else {
$doss1=$dos1;
}
if ($dos2>=10) {
$doss2=$dos2-9;
} else {
$doss2=$dos2;
}
if ($dos3>=10) {
$doss3=$dos3-9;
} else {
$doss3=$dos3;
}
if ($dos4>=10) {
$doss4=$dos4-9;
} else {
$doss4=$dos4;
}
if ($dos5>=10) {
$doss5=$dos5-9;
} else {
$doss5=$dos5;
}
if ($dos6>=10) {
$doss6=$dos6-9;
} else {
$doss6=$dos6;
}
if ($dos7>=10) {
$doss7=$dos7-9;
} else {
$doss7=$dos7;
}
if ($dos8>=10) {
$doss8=$dos8-9;
} else {
$doss8=$doss8;
}
$res1=$doss1+$doss2+$doss3+$doss4+$doss5+$doss6+$doss7+$doss8;
$res2=$ddos1+$ddos2+$ddos3+$ddos4+$ddos5+$ddos6+$ddos7;
$rez=$res1+$res2;
print $magic.$rez.'<br>';
$d=$rez%10;
if ($d==0) {
print $valid.$result.$d;
} else {
$k1=$rez+1;
$k2=$rez+2;
$k3=$rez+3;
$k4=$rez+4;
$k5=$rez+5;
$k6=$rez+6;
$k7=$rez+7;
$k8=$rez+8;
$k9=$rez+9;