The bank card number and bank branch where the account is opened are verified by the PHP background.
The reasons are as follows:
PHP (hypertext preprocessor) is mainly used to calculate the legitimacy of credit card and other document numbers.
1. Starting from the last digit of the card number, multiply the even digits by 2. If the result of multiplying by 2 is a two-digit number, add the numbers in the two digits and save them. Add all the numbers. Get the sum, which is divisible by 10 if the credit card number is legitimate (
Reference: /question/1605342902269288667.html?qbl=relate_question_2amp; word=PHP20BAF3CCA820D1E9D6A4D2F8D0D0BFA8BAC520BACD20BFAABBA7D2F8D0D0D 6A7D0D0CAC7B7F1C6A5C5E4).
2. The method implemented by PHP to determine which bank it is based on the bank card number:
(
Reference: /kn/201555112522KB.html)
The content of bankList.php will be written below. Please select all the data and save it as bankList.php file for use.
header('Content-type: text/html; charset=utf-8');
require_once('bankList.php');
function bankInfo($card, $bankList)
{
$card_8 = substr($card, 0, 8);
if (isset($bankList[ $card_8])) {
echo $bankList[$card_8];
return;
}
$card_6 = substr( $card, 0, 6);
if (isset($bankList[$card_6])) {
echo $bankList[$card_6];
return;
}
$card_5 = ??substr($card, 0, 5);
if (isset($bankList[$card_5])) {
echo $bankList[$card_5];
return;
}
$card_4 = substr($card, 0, 4 );
if (isset($bankList[$card_4])) {
echo $bankList[$card_4];
return;
}
echo 'The card number information has not been entered yet';
}
bankInfo('6228481552887309119', $bankList);
//-------------The following content is the content of bankList.php. Please select all the following content and save it as bankList.php file for use.
--------
lt;?php
$bankList = [
'621098' =gt; 'Postal Savings Bank-Green Cartoon - Debit card',
'622150' =gt; 'Postal Savings Bank - Green Card UnionPay Standard Card - Debit Card',
'622151' =gt; 'Postal Savings Bank Bank - Green Card UnionPay Standard Card - Debit Card',
'62316901' =gt; 'Kaixian Taiye Rural Bank - Kaixian Taiye Rural Bank Taiye Card - Debit Card',
'62316906' =gt; 'Dongguan Houjie Huaye Village Bank - Easy Card - Debit Card',
'62361026' =gt; 'Xi'an Gaoling Sunshine Village Bank - Jinsi Road Sunshine Card - Debit Card',
'62361025' =gt; 'Shaanxi Luonan Sunshine Village Bank - Jinsi Road Sunshine Card - Debit Card',
'62168305 ' =gt; 'Jiangsu Lishui Minfeng Rural Bank-Jinding Card-Debit Card',
'62335101' =gt; 'CJSC "Spitamen Bank" (30030762)-classic-debit card',
'62335102' =gt; 'CJSC "Spitamen Bank" (30030762)-gold-debit card',
'62335103' =gt; 'CJSC "Spitamen Bank"( '30030762)-platinum-debit card',
'62335104' =gt; 'CJSC "Spitamen Bank" (30030762)-diamond-debit card',
'62335105' =gt; 'CJSC "Spitamen Bank" (30030762)-classic-debit card',
'62335106' =gt; 'CJSC "Spitamen Bank" (30030762)-gold-debit card',
'62335107' =gt; 'CJSC "Spitamen Bank" (30030762)-platinum-debit card',
'62335108' =gt; 'CJSC "Spitamen Bank" ( 30030762)-diamond-debit card',
];
//------------------bankList.php All content ends here--------------------------