How to encrypt a PHP file for free?

Joey Morani picture Joey Morani · Jul 24, 2011 · Viewed 25.6k times · Source

I have created a plugin for WordPress although I would like to encrypt it to stop people viewing the source code. I've heard of Zend Guard and IonCube although is there a free alternative to these? Thanks for the help. :)

Answer

takeshin picture takeshin · Jul 24, 2011

Looks like the things you choose are not working this way:

  • Wordpress is open source
  • PHP is not compiled
  • any obfuscation can be decoded

If you don't want to share the source, provide the code as a service. You may require the user to enter API key etc.


  • Execute the code on your server and send response (e.g. JSON or XML) to the Wordpress part.
  • Allow only the users who paid for the service to access the service on your server
  • Authenticate the users by selling and then checking the API key

See: SaaS