can i create dll in php??

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

we are using dll files like lib_mysql.dll to access the built-in
functions to access mysql database in php.

is there anyway so that i can make my dll and put my functions in dll
and then access them so it protects my function source code.

pls help

thxs for help in adavance....

Re: can i create dll in php??

Quoted text here. Click to load it

Since DLL (dynamically Loaded Libraries) are created from compiled code,
I'd say you have very little chance of creating a dll from php code
which isn't compiled.

So, either switch to writing your site as a stand-alone application or
stick with php or check out some of the commercial code obfiscators.  
Zend has a byte-code "compiler" for php but it ain't free.

DeeDee, don't press that button!  DeeDee!  NO!  Dee...

Re: can i create dll in php??

dlls are not all same. You could use c/c++ to make your PHP extension.
Or if you use dotnet, you could use Phalanger to complie your php code
to .Net assembly(dll).

Re: can i create dll in php??

Kimmo Laine wrote:
Quoted text here. Click to load it

Unless next_page.php generates PHP, the script with this include will
only get HTML.

Quoted text here. Click to load it


    if (isset($_GET['foo'])) {
      echo '<?php echo $_GET[\'foo\']; ?>';
    } else {
      echo '<?php echo \'Not available\'; ?>';

File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot

Re: can i create dll in php??

vishal wrote:
Quoted text here. Click to load it

There are other ways to protect your source code, such as

If you insist on compiling your PHP code into DLLs, consider

1. DLLs are platform-dependent.  You can only use them in
   under one OS.  DLLs compiled under Windows will not work
   under Linux and vice versa.
2. Installation of DLLs requires root-level privileges on
   the host machine.
3. While it is possible to compile PHP into DLLs (Phalanger
   can do that), there is no guarantee that those DLLs
   will be usable by PHP.  In fact, PHP has a rather
   strict set of requirements as to how extension libraries
   should be written.  DLLs compiled by Phalanger, in contrast,
   are meant to be used by .NET languages, not PHP...


Re: can i create dll in php??

technically you could create DLLs in PHP (as PHP allows you to write files
in binary mode), but basically youd also need to write a compiler 8-)
There is no point though, when plenty of other languages and compilers offer
DLL creation.  Use the right tool for the job - PHP is not the right tool
for generating compiled code

Site Timeline