Best method to secure php code for sale

Discussion in 'PHP' started by redlorry919, Oct 21, 2007.

  1. #1
    Hi all,

    I sell a number of scripts and generally they have all been 100% unencoded php source code. Recently there have been some issues with buyers duplicating the code on multiple sites without paying for multiple licences - this is obviously hard to control when they have the complete source code.

    I'm therefore looking at ways to encrypt the code by to adding code which restricts it to a particular domain name. The 'restricting' code I have no issues with, the problem is what to encrypt?

    My initial thoughts where to have an include which did the lookup and validation of the domain name/license, this would be encrypted with zend or sg. The problem however is that since the rest of the code is unencrypted, anyone could just remove the include code in the relevant file.

    I wouldn't want to encode the entire site since it's of benefit that the code is available.

    Any ideas?
     
    redlorry919, Oct 21, 2007 IP
  2. Edynas

    Edynas Peon

    Messages:
    796
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I had the same problem. The answer i got was make the call to your encrypted functions deep inside your code.
    But if you leave the code largely un-encrypted...someone that knows php will be able to read your code and get ideas how to do what you did and rewrite it
     
    Edynas, Oct 22, 2007 IP
  3. robca

    robca Well-Known Member

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    116
    #3
    there is a way, zend has the solution but that will cost some $ maybe you will find more on the zend website!
     
    robca, Oct 22, 2007 IP
  4. redlorry919

    redlorry919 Peon

    Messages:
    384
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yeah ultimately I think I've come to the conclusion that it's not going to be 100% secure no matter what I do. The scripts however do have a function library file so I'll probably look including the license here and encrypting, since the scripts wont run without this file.
     
    redlorry919, Oct 22, 2007 IP
  5. Edynas

    Edynas Peon

    Messages:
    796
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Before you buy the zend or ioncube...ioncube has a service that you can encrypte a file/folders for a few dollars. No need to spend $100 + if you only gona use it once.
     
    Edynas, Oct 22, 2007 IP
  6. gil719

    gil719 Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    There is an option I found online. You can find it at http://www.gstudios.org/php-encrypter.php. It is free and even allows you to lock it specific domains. For example, you could set it to yoursite.com so if mysite.com tries to run it, it won't allow it to. The whole PHP source code is encoded. I hope that works!
     
    gil719, Sep 9, 2010 IP
  7. lowridertj

    lowridertj Well-Known Member

    Messages:
    2,882
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    195
    #7
    zend is easily decrypted now a days.

    I same go with ioncube it can still be decrypted, but a great deal harder.
     
    lowridertj, Sep 9, 2010 IP