469,366 Members | 2,342 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,366 developers. It's quick & easy.

can i create dll in php??

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....

Jul 17 '05 #1
5 13857
In article <11*********************@g14g2000cwa.googlegroups. com>,
"vishal" <vi************@yahoo.co.in> wrote:
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....


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...

Jul 17 '05 #2
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).

Jul 17 '05 #3
JDS
On Thu, 07 Apr 2005 01:06:26 -0700, vishal wrote:
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....


Why? In a properly configured webserver environment, no one should ever
see your PHP code except you.

--
JDS | je*****@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

Jul 17 '05 #4
NC
vishal wrote:

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.


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

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

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...

Cheers,
NC

Jul 17 '05 #5
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
Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by I_AM_DON_AND_YOU? | last post: by
10 posts views Thread by Zack Sessions | last post: by
37 posts views Thread by Steven Bethard | last post: by
18 posts views Thread by Steven Bethard | last post: by
5 posts views Thread by Michael | last post: by
2 posts views Thread by masri999 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.