php licensing system

Discussion in 'PHP' started by nQQb, Feb 24, 2008.

  1. #1
    Hi,

    I need a simple php licensing system built...It doesn't have to be complicated since the php script I plan on using it targets web newbies.

    Basically, I will sell a digital product upon payment from paypal and deliver php script as zip file.

    I want to issue a license key or lock the script to a domain name. I should be able to cancel this license in the future if there's a payment problem or chargeback....

    any solutions? price?

    Thanks!
     
    nQQb, Feb 24, 2008 IP
  2. imvain2

    imvain2 Peon

    Messages:
    218
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    To successfully accomplish exactly what you are looking for, your php code will need to be encrypted. Otherwise any php based system will be easy to bypass.

    I thought of encrypting the zip file, but that doesn't fix the charge back problem.

    So an idea that I had for anyone is...

    Use paypal's IPN to create a new db record upon successful payment with the domain name for the license.

    When the code is run on the server, have it do a simple file_get_contents to check the current domain against the db to see if its valid or not.

    If not valid, disable or place advertising and stuff.

    Using paypal's IPN, charge backs and stuff should be sent back to the main server where it can set the db record to state the domain name is not valid.
     
    imvain2, Feb 24, 2008 IP
  3. os-vdo

    os-vdo Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Have you tried this phpaudit.com?

    I was looking for the same thing a while back & you can lock scripts to one domain,etc...

    Also re encryption you could just encrypt 1 file (which contains the licensing code & something important to the script to avoid people just removing the file).
     
    os-vdo, Feb 24, 2008 IP
  4. NathanH

    NathanH Peon

    Messages:
    39
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    NathanH, Feb 24, 2008 IP
  5. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #5
    Any "call home" for license features needs to default to status = okay if your server is down.

    Adding the same to the admin function will greatly reduce the load on your server if your script becomes popular.

    A few will beat the system no matter what you do.

    If you guys solve the first two, be sure to post the results in this thread.
     
    Colbyt, Feb 24, 2008 IP
  6. NathanH

    NathanH Peon

    Messages:
    39
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    It would also be a good idea to add your own protection to your script. The protection used in the popular licensing software can easily be cracked.
     
    NathanH, Feb 24, 2008 IP
  7. tickedon

    tickedon Member

    Messages:
    34
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    48
    #7
    Having a call home default to 'okay' if the server is down is a very bad idea. Anyone with their own server can simply firewall out the licensing server IP - creating the 'impression' the server is down, and thus, using the product for free forever. Even on shared/reseller hosting, a htaccess file can be used to restrict functions (on some hosts and setups) which can again result in an apparent 'server down' result.

    The best thing to do is to use the 'local keys' feature in Iono and PHPAudit - both are essentially an encrypted local copy of the license key. This means license validation can take place without any remote communication/call home needed, and a new license key is simply fetched every X days (which also reduces server load).

    Apart from that, I'd suggest using ionCube to encode your PHP script. Using Zend Guard at the moment is a very bad idea as it's pretty much useless now that there are decoders floating around all over.
     
    tickedon, Mar 4, 2008 IP
  8. nQQb

    nQQb Active Member

    Messages:
    332
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #8
    Thanks for your thoughts and helpful information...I'm still clueless on how to implement it. I have zend guard but I need proper code before I encrypt files. I'm actually looking for a PHP code which I can include in my script before I encrypt and release the script.
     
    nQQb, Mar 4, 2008 IP
  9. Chris Blood

    Chris Blood Peon

    Messages:
    1,487
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I have built a simple license script myself that calls back to check if a license is valid. It also has an admin panel for your home site where u can activate a deactivate domain licenses. The script does not have a members area or order system but if you would maybe want to take a look at it PM me.
     
    Chris Blood, Mar 13, 2008 IP
  10. nQQb

    nQQb Active Member

    Messages:
    332
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #10
    Well, this thread didn't go far but I managed to develop a licensing system.

    Please have a look at http://www..protectscripts.com and check out the demo. Let me know your thoughts.

    Thanks!
     
    nQQb, Jul 25, 2008 IP
  11. Chris Blood

    Chris Blood Peon

    Messages:
    1,487
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Great script but you should make an api for it;)
     
    Chris Blood, Aug 4, 2008 IP
  12. JefK

    JefK Member

    Messages:
    66
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    45
    #12
    I'd go with PHPLicengine. A useful tool to license and protect your php code or script.
     
    Last edited: Jul 31, 2009
    JefK, Jul 31, 2009 IP