• Sell License Keys Online with PHP-KeyCodes

  • PHP-KeyCodes


    This is a PHP / MySQL application that you install on your web site to sell license keys and automatically deliver them to a customer after purchase from PayPal. These may be mobile pin numbers, key codes or be any other form of license codes.

    PHP-KeyCodes provides the checking of the completed transaction before the codes are sent out to the purchaser by email. It is an automatic delivery system where the top license code or pin number is extracted and automatically sent to the customer without any intervention by yourself.

    The application does not create the pin numbers themselves although there are a set of php functions which can be modified to do your own custom processing, for example, create a pin code based on the customer name.

    The customer does not have to have a PayPal account to purchase an item but can use any supported Credit Card. PayPal then becomes just a payment gateway for the credit card.

  • PHP-KeyCodes

    Main features

    • Monitors the purchase so that the software license keys are sent out on completion of payment.
    • Keys are stored in a table in the database for each product and the top one is extracted when purchased.
    • Used license keys are removed from the database and when a minimum number is reached an email is sent to the site administrator.
    • When zero key codes are left in a product, that product cannot be purchased.
    • CSV Export for sales and transactions
    • The buy now button code is displayed in the admin section for copying onto your web site.
    • Includes a test page to check the operation of the scripts.
    • Emails can be sent either using the in-built PHP method or using SMTP.
    • Email test function.
    • Includes a facility to send a complementary sell to a customer.
    • All pages written in PHP and script is NOT encrypted. requires mySQL.
    • All credit card transactions are handled by PayPal.
  • PHP-KeyCodes

    WordPress Version

    For a Plugin that can be installed on WordPress click here:

    WordPress Version
  • PHP-KeyCodes

    Purchase from Demo

    The following is a demo purchase which costs $0.01 and shows what happens when a customer makes a purchase.

    The above item costs $0.01. After purchase you will receive an email with a test software license key.

  • PHP-KeyCodes


    There are a number of checks in the script to ensure that the data received from PayPal has not been modified. The license key will only be sent out when all checks are correct.

    • The script checks the transaction id in the database to make sure that it has not been previously used.
    • The cost and currency of the item is checked to make sure that it has not been changed.
    • The receiver email address is checked to make sure that it is your primary PayPal receiver email address.
  • PHP-KeyCodes

    Email customers via newsletter

    These functions can be used to send out newsletters to all or specific customers.

    • Email all customers who have purchased any item.
    • Email all customers who have purchased a particular item.
  • PHP-KeyCodes


    • PHP 7 and 8
    • Apache web server
    • An SSL certificate on your web server to use https for communications with PayPal
    • MySQL database version 3.23 or higher
    • Linux, FreeBSD or Windows operating system on the web server
    • A Paypal Business or Premier account - sign up here.
    • Email functionality on the web server so that the PHP scripts can send out emails to customers.
    • If you are looking for a suitable host for you site, I would recommend the basic web hosting plan from siteground which has all the required features for this application.

    It uses only 'standard' php, does not require any extra php modules, it should not need any changes to the .ini file and does not requires any modifications to file folder permissions.

  • PHP-KeyCodes