bool ccVal(
string
$Num, [string
$Name = 'n/a'])
|
|
ccVal - Credit Card Validation function.
This function accepts a credit card number and, optionally, a code for a credit card name. If a Name code is specified, the number is checked against card-specific criteria, then validated with the Luhn Mod 10 formula. Otherwise it is only checked against the formula. Valid name codes are:
mcd - Master Card vis - Visa amx - American Express dsc - Discover dnc - Diners Club jcb - JCB
Copyright (c) 1999 Holotech Enterprises. All rights reserved. You may freely modify and use this function for your own purposes. You may freely distribute it, without modification and with this notice and entire header intact.
A description of the criteria used in this function can be found at http://www.beachnet.com/~hstiles/cardtype.html. If you have any questions or comments, please direct them to ccval@holotech.net
maybe also check http://www.icverify.com/ --andrej
there is also detailed description at http://www.webmasterbase.com/article/728
Parameters: