• Stars
    star
    110
  • Rank 310,312 (Top 7 %)
  • Language
    PHP
  • Created over 8 years ago
  • Updated over 3 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.