BENCODER v1.3 - Encode your PHP script using bcompiler


About bencoder

bencoder is a script to automate the encoding task using bcompiler.

bcompiler has the capability to encode entire script in a proprietary PHP application.

But the encoding task needs to be done manually, by calling the functions provided by bcompiler,
such as bcompiler_write_header(), bcompiler_write_file() and bcompiler_write_footer() functions.

bencoder helps to do these for you, it's very similar to the encoder script provided by eAccelerator.

bencoder is an open source software, and it applies GPL license.


Revision History:

v1.1 - 2006/07/25 - first public release
v1.2 - 2006/08/08 - support recursive mode
v1.3 - 2006/11/07 - support bzip2 compression (thanks to Paul Mandalka)

Usage:

bencoder [-f] [-q] [-b] -o FILE file1.php
bencoder [-f] [-q] [-b] -o OUTDIR file1.php file2.php ...
bencoder [-f] [-q] [-b] -o OUTDIR -s SRCDIR [-e SUFFIX] [-r] [-c] [-l]
  -o FILE   : the file name to write the encoded script
              (default to '-encoded.XXX' suffix)
  -o OUTDIR : the directory to write all encoded files

  -a SRCDIR
  -s SRCDIR : encode all files in this source directory

  -r        : encode directories recursively (no by default)
  -f        : force overwriting even if the target exists
  -e SUFFIX : encode the files with the SUFFIX extension only (default: php)
              (regular expression allowed, ex: "php|inc")
  -c        : copy files those shouldn't be encoded (no by default)
  -l        : follow symbolic link (no by default)
  -q        : do not print the file name while encoding or copying
  -b
  -bz2      : compress the encoded files with bz2 (needs bzip2-extension)

Download:    http://bencoder.urdada.net/bencoder
# wget http://bencoder.urdada.net/bencoder
# mv bencoder /usr/local/bin/
# chmod 755 /usr/local/bin/bencoder

Reference: