Bin e padrões para validação de cartão de crédito.
| Bandeira | Começa com | Máximo de número | Máximo de número cvc | Regex |
|---|---|---|---|---|
| Visa | 4 |
13,16 | 3 | ^4[0-9]{12}(?:[0-9]{3}) |
| Mastercard | 5 |
16 | 3 | ^5[1-5][0-9]{14} |
| Diners | 301,305,36,38 link |
14,16 | 3 | `^3(?:0[0-5] |
| <?php | |
| /** | |
| * Wraps a message $content in a responsive e-mail template. | |
| * | |
| * Reference: http://zurb.com/playground/projects/responsive-email-templates/basic.html | |
| */ | |
| function post_mail_content( $content ) { | |
| ob_start(); ?><html xmlns="http://www.w3.org/1999/xhtml"><head> | |
| <meta content="width=device-width" name="viewport"> |
Bin e padrões para validação de cartão de crédito.
| Bandeira | Começa com | Máximo de número | Máximo de número cvc | Regex |
|---|---|---|---|---|
| Visa | 4 |
13,16 | 3 | ^4[0-9]{12}(?:[0-9]{3}) |
| Mastercard | 5 |
16 | 3 | ^5[1-5][0-9]{14} |
| Diners | 301,305,36,38 link |
14,16 | 3 | `^3(?:0[0-5] |
| <?php | |
| // The libxml entity loader is disabled by default | |
| // even setting the libxml_disable_entity_loader to false doesn't works! | |
| // | |
| // @see http://uk3.php.net/manual/en/function.libxml-disable-entity-loader.php | |
| // @see http://stackoverflow.com/a/10213239 | |
| $dir = __DIR__; | |
| $content = 'This is a remote content!'; | |
| file_put_contents('content.txt', $content); |