PDA

View Full Version : Jamaican Cell number checker script



MadHacker
October 26, 2005, 07:14 PM
Nice likkle piece a code only set back I didnt add miphone to it may be tomarrow I send the finish product additional to sending text to cell phone and all :p

function textmessage($mycell ){
//get the first 3 digit off the number

$getcell=substr($mycell, 0, 3);
$checkcell=$getcell;
// CW CODE VALIDATION
$i=309;
do{ $i++;

if (!(strcmp("$checkcell", "$i")))
{$cellmsg= "cable and wireless";}

}while($i<349);
//echo $cw1;
$i=699;
do{ $i++;

if (!(strcmp("$checkcell", "$i")))
{$cellmsg= "cable and wireless";}

}while($i<839);
/// end cable and wireless check

//digicel

$i=349;
do{$i++;
if (!(strcmp("$checkcell", "$i")))
{$cellmsg= "Digicel";}
} while($i<400);

$i=839;
do{$i++;
if (!(strcmp("$checkcell", "$i")))
{$cellmsg= "Digicel";}
} while($i<900);
///end digicel


echo $cellmsg;
/// function ends
}


?>


<form action="" method="post"><input name="cellnumber" type="text" /><input name="" type="submit" /></form>
<? if ($_POST['cellnumber']!=""){
$cellnum= $_POST['cellnumber'];

textmessage($cellnum);
}
?>