5120293213632438
,我将使用' substr'要获得前6个数字,如果这6个数字与512029
,537030
,432049
等匹配,我将要求提供更多信息 - >增值税号和身份证。
<form action="validate.php" method="post">
<p>Credit Card Number : <input type="text" name="cc" /></p>
<p><input type="submit" value="Next"></p>
</form>
validate.php
<?php
$vbv = substr($_POST['cc'], 6);
if($vbv == '512029')
$flag = strstr($bin, $needle);
echo "OK";
else
echo "I'm not VBV";
?>
答案 0 :(得分:0)
<?php
ini_set('display_errors', 1);
$array=array(512029, 537030, 432049); //array of start 6 digits you want to match
$cc='5120293213632438';//credit card no's you want to match.
if(in_array(substr($cc, 0,6),$array))
{
echo "First 6 digit matched";
}