Almost all credit card numbers used are generated using Luhn’s algorithm. Luhn’s algorithm is a simple checksum formula to validate variety of numbers. We can use the same formula for checking whether a given credit card number may be valid or not.
This can be used as a good technique to validate the credit card number in your web application. I found a simple function which validates any given number according to Luhn’s formula and gives the result to be true or false. The function is implemented in PHP and the primary source of this function is here.
This small function is very useful if you want to check the validity of the credit card number being provided before passing it to your payment mechanism.
Sample Credit Card Numbers for testing
When I implemented this in my code, I also wanted to have some sample credit card numbers to test this. Sample credit card numbers are also very useful in many cases so here are the credit card numbers that I found.
Credit Card Type
Credit Card Number
American Express Corporate
4222222222222Note : Even though this number has a different character count than the other test numbers, it is the correct and functional number.
I have all my email accounts added in my gmail which works as an email client and I can access all of them through my gmail account. This is a very useful feature for everyone who has more than one email accounts to keep track of. For this you need POP enabled, which lets any email client download messages from your email provider’s server. Enabling POP is available for all of gmail accounts but for a normal yahoo account it asks you to upgrade to a plus account if you want to enable POP. POP can be accessed by going to POP & Forwarding in Mail Options for Yahoo.
There are two ways to enable POP for your Yahoo account, the obvious one is to pay them and get Mail Plus and the other workaround to get it working for free is discussed below.
Enabling POP on Yahoo for free:
Log in to your Yahoo Account, look for your name on top left of the screen, with a small arrow with it.
Click on your name which will open a drop down with some options, findand click on Account Info in this list.
It shall ask you for your password, enter your password to get on your account info page
Scroll down this page for Account Settings section, and click on Set language, site, and time zone
On the next page changeRegional Site and Languages to Yahoo Asia.
After that refresh your browser and go to Mail Options under the Options menu on top.
Click on POP & Forwarding on left and you will see now you can enable POP for your Yahoo Account !
POP Server Settings for Yahoo!
The following settings can be used to setup your Yahoo! account on any other email client
Incoming Mail (POP3) Server
pop.mail.yahoo.com (Use SSL, port: 995)
Outgoing Mail (SMTP) Server
smtp.mail.yahoo.com (Use SSL, port: 465, use authentication)
Account Name/Login Name
Your Yahoo! Mail ID (your email address without the “@yahoo.com”)
Your Yahoo! Mail address (e.g., firstname.lastname@example.org)
Your Yahoo! Mail password
If it does not work for anyone then please tell me about it in the comments section below, same goes for any queries that you may have.