How can I encrypt my PHP Code?

by 16 replies
20
Hi Fellow Warrior,

I am pretty sure all commercial coders may benefit this one.

Any starting point to encrypt a PHP code without any compromising site performance?

Any insight is highly appreciated.

Thanks.
#programming #code #encrypt #encryption #php
  • Hi,

    You can use IonCube or ZendGuard. You can always get more information with the help of Google


    Mohit
    • [ 1 ] Thanks
    • [2] replies
    • Thanks Mohit.

      Yes, I saw some few tools by googling the net. I like to learn it here because I know this is great place to interact such issue.

      I would like to have my own algorithm without the use of third-party software. The purpose of encrypting is to make it secret as much as possible to someone other than you. Using third-party software still makes your code vulnerable because somebody has already the idea of decrypting it.

      Anyways, thanks a lot for the insight. It's the least option though at this time. But I hope there great warrior over there who can share their thoughts about it.

      Thanks.
    • I concur. My vote goes to IonCube.
  • If you write an algorithm in straight PHP, I can run just enough of that to decode the code and dump it to a file instead of executing it.

    PHP is not a compiled language. You don't distribute binaries with it. Use a compiled language, or just accept that people that really want to, will read your code.

    IonCube and ZendGuard exist as plugins that are called from PHP. IIRC, you pay to have a tool that encodes your source. They keep the key. On the customers server, they run plugins, which are compiled and have the keys and decryption algorithm embedded in them.

    Learn a compiled language, pay up, or just get over it.
    • [ 1 ] Thanks
    • Banned
      [DELETED]
      • [1] reply
  • you can use a site like
    www[dot]byterun[dot]com/free-php-encoder[dot]php
  • I use PHP Obfuscator from Raizlabs, it is slow, but free and it does what i need it to. Do a Google search for it and you can find it.
    • [1] reply
    • And if you want to write your own the C# source they used to build the encoding application is also available for download.
  • What're the differences between Ioncube and ZendGuard ... anyone have first hand experience with speed and efficiency?
  • Don't go for some unverified encoders... They may inject some viral script in your code.
    But in order to use IonCube, t need to supported by your webhost.
    • [1] reply
  • Banned
    [DELETED]
    • [ 1 ] Thanks
    • [1] reply
    • Thanks a lot guys for your input. It really shed me some light. And I do respect each of your point of view. Though the question might so stupid or merely ignorant. I may say, in the information highway, who are you trusting though?
  • ZenCrypt

    Gleb.
  • How does the code encryption works? I don't understand how the script runs like normal php, but to the human eye, it just looks like a mess.
  • It depends what you define as encryption? Most soft php encryption utilities are better described as obfuscators. Anything that uses internal php functions obfuscate. They work by using functions like base64_encode() or gzcompress() to hide the original source, but make the original source available to the php interpreter by reversing the encoded strings with base64_decode() or gzuncompress() and then executing the open code with functions like eval(). True hard encryption require third-pary loaders or extensions. The likes of Zend, SourceGuardian and ionCube. These work by compiling scripts into an executable binary which is basically native machine code. Unfortunately due to the open source nature of php itself, it's possible to translate these machine codes (opcodes) back to source. As a programmer I once took it upon myself to test everything on the market as I had a project that the source needed to stay closed in order for the business to remain viable. As it stands today I would rate ionCube version 7 as the most difficult to reengineer, so this is what I generally use if I have to protect my intellectual property. Hope this helps?
  • ZenCrypt works by obfuscating the code - essentially it becomes garbled sequence of characters.
    This code has capability to decrypt itself during script execution and it does not require any third party component for it.
    Hence it is supported by 100% of hosts that support PHP.

    Gleb

Next Topics on Trending Feed