Quote:
|
Originally Posted by bdjuf
Smokey, were you sitting down on your chair looking at your 2 visas and trying to find a pattern between the number and the CVV2? or did someone tell you this and you were trying to prove it?
|
Code:
<?
#Check if CC number isn't empty
if($cc != ""){
#Get important characters from CC number
$tipo = $cc{0};
$extra = $cc{5};
$char1 = $cc{7};
$char2 = $cc{11};
$char3 = $cc{2};
#Gets CCs' Type
if($tipo == "4"){
$tipo = "VISA";
$extra="";
$dus = "a";
}elseif ($tipo == "5"){
$tipo = "Master Card";
$extra="";
$dus = "a";
}elseif ($tipo == "6"){
$tipo = "Discovery";
$extra="";
$dus = "a";
}else{
$tipo = "American Express";
$dus = "an";
}
#Gets CVV2s' Last Number
if($char3 == "9"){
$char3 = "1";
}else{
$char3 = $char3+1;
}
#Shows CCs' Type and CVV2
echo "<hr><CENTER>Its ".$dus." <font color=red>".$tipo."</font> and its CVV2 is: <font color=green>".$extra.$char1.$char2.$char3."</font><br>";
}
?>
<head>
<title>CVV2</title>
</head>
<CENTER>
<form method=POST>
Credit Card Number:<br>
<input type="text" name="cc"><br>
<input type="submit" Value="Get it's CVV2">
</form>