1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Best form of Encryption for protect PHP scripts.

Discussion in 'PHP' started by Sn@Ke, Sep 1, 2013.

  1. #1
    I'm after your opinion on the best possible way to protect a PHP file from being edited / stolen.

    I used to think highly of Ioncube but after some research it doesn't seem very good these days, so I'm looking for the best possible solution.

    Please let me know that you think!
    Sn@Ke, Sep 1, 2013 IP
  2. competent123

    competent123 Notable Member

    Messages:
    1,596
    Likes Received:
    52
    Best Answers:
    6
    Trophy Points:
    205
    #2
    there are many forms of protection to protect a script, however, all can be broken with the determined one.

    the best option i have found is to include a file from your server, ( no license) but some sort of a function that makes it work.
    competent123, Sep 2, 2013 IP
  3. kamilo37

    kamilo37 Active Member

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    put global variables or the entire script in a .inc file and protect it with htaccess. For example:

    File: .htaccess (hidden file)
    Code (Text):
    1. <Files *.inc.php>
    2. Order deny,allow
    3. Deny from all
    4. Allow from localhost
    5. </Files>
    kamilo37, Sep 11, 2013 IP
  4. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,650
    Likes Received:
    22
    Best Answers:
    12
    Trophy Points:
    115
    #4
    @kimilo37; that way you are describing is just to prevent visitors of a site to gain access to certain files... but if you want to secure your sourcecode, ioncube and other encrypting apps are worth looking in to... but 100% secure is nothing! :)
    EricBruggema, Sep 12, 2013 IP
  5. deathshadow

    deathshadow Prominent Member

    Messages:
    5,980
    Likes Received:
    827
    Best Answers:
    144
    Trophy Points:
    395
    #5
    I don't consider there to be a best, as the overhead isn't worth what little protection is offerred. They are too easily slapped aside, and in general defeat the entire point of using a open specification open delivery interpreted language like PHP in the first place!

    You want that type of 'protection', use JAVA or maybe an actual compiled language like C.
    deathshadow, Sep 12, 2013 IP
  6. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,650
    Likes Received:
    22
    Best Answers:
    12
    Trophy Points:
    115
    #6
    But making it harder is to anonymize your code, make weird names for functions, classes and params! oh and remove tabs and spaces where possible! ;) most codes don't have the time to rewrite lots of code to make it readable ;)

    First hit on google is http://www.phpprotect.info/ (obfuscate, sorry my english isn't very great lol)
    EricBruggema, Sep 12, 2013 IP
  7. ryan_uk

    ryan_uk Prominent Member

    Messages:
    3,943
    Likes Received:
    993
    Best Answers:
    33
    Trophy Points:
    365
    #7
    But they can just copy and paste it into a "beautifier" to make it readable.

    I would agree with deathshadow - a compiled language such as C, or focus on the support services and upgrades model. Yes, someone can rip you off, but your company should know its code best, can provide the best support and quickest fixes.
    ryan_uk, Sep 12, 2013 IP