|
|
|
|
|
<?php
/*
Example:
$new_cc_num = AddDash("4580458045804580","Visa");
echo "$new_cc_num";
*/
function AddDash ($CC_Num, $CC_Type)
{
if ($CC_Type = "Visa" || "MasterCard") {
$NewCC="";
for ($i=0; $i < 3; $i++) {
$NewCC .= substr($CC_Num, ($i*4), 4) . "-";
}
$NewCC .= substr($CC_Num, 12, 4);
} else {
$NewCC = substr($CC_Num, 0, 19);
}
return ($NewCC);
} |
|
| credit card security code Categories : PHP, Credit Cards, PHP Classes, Credit Cards | | | Adding dashes to credit card numbers Categories : Strings, Credit Cards, PHP | | | Credit Card Identification and Validation Class - The credit_card class provides methods for cleaning, validating and identifying the type of credit card numbers. Categories : PHP, PHP Classes, Credit Cards, Ecommerce, Algorithms | | | A set of functions to check the validity of a credit card number. Categories : Ecommerce, Credit Cards, PHP | | | Validation function for LUHNMod10 and variant. Can discriminate credit card numbers of varying lengths. Uses [Double >> Sum-of-Digits] transform. Categories : Credit Cards, Authentication, Ecommerce, PHP | | | Credit Card validation routine. Uses MOD 10 to check if credit card number is valid. Categories : Ecommerce, Credit Cards, PHP, Complete Programs | | | an example of the cyberlib payment class Categories : PHP, PHP Classes, Ecommerce, Credit Cards | | | After discovering some credit card validation routines didnt work - here is one that I found works with all the numbers I have tried so far Categories : Credit Cards, Ecommerce, PHP | | | ECHOcart - Open Source Shopping Cart Categories : PHP, Credit Cards, Ecommerce | | | Query2Report : Generating Html, Pdf and Csv Reports from SQL Query Categories : PHP, PHP, HTML, PDF, Excel | | | Selecting a random line from a text file Categories : PHP, Filesystem, Arrays, Beginner Guides | | | Simple way to replace a variable value in a .conf (.ini) file using a
webbrowser - the first stage of a complete universal configuration editor Categories : PHP, Regexps, Code Editors, Filesystem | | | Display Slashdot headers on your own site Categories : HTML and PHP, HTML, PHP | | | PhpLens PHP Application Server Categories : Content Management, Databases, PHP, MySQL | | | A Simple Script that converts IP addresses to Color Codes -This function converts a given IP into a hex color. It changes according to ip input. Very useful to create customised pages. Categories : PHP, BC math | |
| |
| |
|