Skip to content

Protecting your code

The Encoder is the heart of Oxrion Cloud. You upload your PHP, choose how it should be protected, and download an encrypted file that runs anywhere the Loader is installed.

Open the Encoder in Oxrion Cloud and upload your code:

  • A single .php file, or
  • An entire project as a ZIP — the folder structure and file names are preserved in the protected output.

Choose your options (below), encode, and download the protected result to ship.

When you encode, the Configuration panel lets you set how the file is protected. The options appear in this order, and you fill them in top to bottom:

First, choose where the file is allowed to run:

  • Public — runs on any server that has the Loader installed. No extra setup.
  • Private — also requires an external key on the server. The Loader alone isn’t enough; the matching key must be present. This restricts your code to servers you authorize.

If you chose Private, pick the external key the file should require — select one of your saved external keys, or paste a 32-hex key directly. The same key must then be present on the server where the file runs. (Public files skip this step.)

Turn on Licensed to tie the file to a customer — a specific domain and expiry. Choose the license key to use. A licensed file needs a matching license file (.lic) on the server to run; you generate that .lic afterward in the License Manager.

Licensing is independent of access: you can license a public file, a private file, or neither. This is how you sell software that only runs on a customer’s domain, optionally until a certain date.

Turn on Recovery to make the file restorable to source later, and pick the public key to use. Only files encoded with Recovery on can be restored, using the matching private key you hold. See Recovery.

If you marked a file as Licensed, generate its .lic afterward:

  1. Open the License Manager.
  2. Generate a .lic file using the same License Key, the customer’s domain, and an expiry:
    • Perpetual — never expires.
    • Period — expires a set number of months or years from today.
    • Specific date — expires on a chosen day.
  3. Ship the .lic file to your customer alongside the protected file.

The Loader matches the .lic to the protected file by the License Key, and rejects the file on any domain other than the one in the license. If the license expires, the file stops running.

The domain must be a real hostname like example.com or sub.example.com. Single words, localhost, and IP addresses aren’t accepted as license domains.

Free and Pro plans differ in how the protected files behave — see Plans & limits.