• Stars
    star
    110
  • Rank 316,770 (Top 7 %)
  • Language
    PHP
  • Created about 9 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple PHP coupon code generator to genrate N number of coupons.

Simple PHP Coupon Code Generator

Coupon code generator this is php class, which provides the ability to generate coupon codes on various parameters. Its key feature is the generation of a coupon code on a mask like this β€œXXXXXX” or β€œprefix-XXXX-XXXX-suffix” where β€˜X’ – random symbol, β€˜-’ – custom separator.


Technology used

HTML, CSS, JS, PHP

Key Feature

  • Support prefix- and –suffix
  • Support any coupon mask
  • Support all numbers, alphabets, symbols
  • Support different lenghts
  • Generate N number of coupons
  • Simple Portal
  • Export codes to excel sheet

Usage

1) Dynamic length
coupon::generate(8); // J5BST6NQ

2) Using prefix
coupon::generate(6, ”XYZ-”); // XYZ-NT163E

3) Using suffix
coupon::generate(6, ”XYZ-”, β€œ-ABC”); // XYZ-TC2MSD-ABC

4) Without numbers
coupon::generate(6, ””, ””, false); // LNTDRS

5) Without letters
coupon::generate(6, ””, ””, true, false); // 835710

6) With symbols
coupon::generate(6, ””, ””, true, true, true); // #H5&S!7

7) Random register (includes lower and uppercase)
coupon::generate(6, ””, ””, true, true, false, true); // aT4hB2

8) With custom Mask Note: length does not matter
coupon::generate(1, ””, ””, true, true, false, false, β€œXXXXXX”); // STG6N8

License

Simple PHP Coupon Code Generator is licensed under the WTFPL license.