Just needs to be fixed and it will work with some networks....
find this
PHP Code:
<?
//Grabs the IMEI
$imei = $_REQUEST["imei"];
//Loops all the Odd IMEI numbers, then times it by 2
for( $i = 0 ; $i<14 ; $i++ ) {
$imei1 = $imei{$i}*2;
//THIS is where the main error is. It always shows up as Zero.
$imei1a = $imei1a + $imei1{0} + $imei1{1});
}
//Another Loop, For even numbers
for( $i = 1; $i<14; $i++) {
$imei2 = $imei{$i}*1;
$imei2a = $imei2 + $imei2a;
}
//Adds the Results together.
$imei3 = $imei2a + $imei1a;
//If the Remainder is 0 the sum check equals zero
if($imei3 % 10 == 0) {
$sum == 0;
}
//Otherwise:
else {
$sum == 10 - $imei3 % 10;
}
//Validation stage - Finds if valid or not
if($imei3 % 10 != $sum) {
echo 'Invalid';
} else {
echo 'Valid!';
}
?>
PHP Code:
for( $i = 0 ; $i<14 ; $i++ )
{ $imei1a[$i] = $imei[$i]*2; }
Comment