Results 1 to 7 of 7

Thread: Protecting/encyrpting PHP code

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2006
    Posts
    263

    Question Protecting/encyrpting PHP code

    HI Guys,

    Im just new in PHP but i already tried this thing work in our office.

    What my main concern is anybody can be the code i made in php once he access the server. Is there a way to protect my code inside the server so that other cannot easily copy the one I done already?


    Thanks.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Protecting/encyrpting PHP code

    There are PHP bytecode compilers and obfuscators that make it very tricky to get anything useful from the code. However, using that means that the server is set up to deal with it. If it is, then it's probably either a proper commercial server, where it would be a gross violation of security setup and customer separation if anyone else could just read your code, or it is your own server which you set up correctly, in which case no user you don't trust should ever have access anyway.

    In other words, if someone has access to your code, you have bigger worries than the guy having access to your code.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2006
    Posts
    263

    Question Re: Protecting/encyrpting PHP code

    Ok thanks for the tip.

    Do this sample encryptor by the way available in the web as a freeware?

    Just want to try something. But I hope using this doesn't affect the performance of the Php code I created.

    Thanks again

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Protecting/encyrpting PHP code


  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2006
    Posts
    263

    Smile Re: Protecting/encyrpting PHP code

    Oww!! thanks for the link!

    Very informative discussion.

    Thanks again!

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: Protecting/encyrpting PHP code

    In reality, though, the only time you might need to protect PHP code is when you want to ship something as a commercial framework. By that time, you'll be able to afford the full Zend Studio with all the byte code compiling it offers.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  7. #7
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Protecting/encyrpting PHP code

    Compiling to byte code also has the advantage of making it faster and more efficient. This is however negated if you run PHP as a module because the compiled scripts are cached in memory while the server is running.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width