470,833 Members | 1,722 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

hide php code

Hi,

I have a webserver which some user have their own accounts on. I want
to provide the users with some public classes which they may use use
when they are making there own php code placed in their own
directories.

I want the code to be accessable via an interface (like h-files in c)
but I do not want my code to be viewable to the users which are using
my classes. Very much like a library or something.
How do I make php code which are hidden but are free to use by my
users with a defined interface against my classes?
Jul 17 '05 #1
8 6048
*** karolina escribió/wrote (15 Sep 2004 11:39:22 -0700):
I want the code to be accessable via an interface (like h-files in c)
but I do not want my code to be viewable to the users which are using
my classes. Very much like a library or something.
How do I make php code which are hidden but are free to use by my
users with a defined interface against my classes?


If there's a way to do so, I can only think of a PHP encoder like Turck
MMCache or a similar tool:

http://turck-mmcache.sourceforge.net/index_old.html

Check the "Encoder" part.

--
-+ Álvaro G. Vicario - Burgos, Spain
+- http://www.demogracia.com (la web de humor barnizada para la intemperie)
++ Las dudas informáticas recibidas por correo irán directas a la papelera
-+ I'm not a free help desk, please don't e-mail me your questions
--
Jul 17 '05 #2
karolina wrote:
Hi,

I have a webserver which some user have their own accounts on. I want
to provide the users with some public classes which they may use use
when they are making there own php code placed in their own
directories.

I want the code to be accessable via an interface (like h-files in c)
but I do not want my code to be viewable to the users which are using
my classes. Very much like a library or something.
How do I make php code which are hidden but are free to use by my
users with a defined interface against my classes?


try defining an additional include-path in the php.ini file. then just
tell them the class names to include. they won't be able to see the code
- i think. it's the same procedure as with the pear-packages :)

regards
SH

--
"The goal of Computer Science is to build something that will last at
least until we've finished building it." -- unknown
Jul 17 '05 #3
In article <2q*************@uni-berlin.de>,
Stefan Hegenbart <ic*@hegi.info> wrote:
karolina wrote:
Hi,

I have a webserver which some user have their own accounts on. I want
to provide the users with some public classes which they may use use
when they are making there own php code placed in their own
directories.

I want the code to be accessable via an interface (like h-files in c)
but I do not want my code to be viewable to the users which are using
my classes. Very much like a library or something.
How do I make php code which are hidden but are free to use by my
users with a defined interface against my classes?


try defining an additional include-path in the php.ini file. then just
tell them the class names to include. they won't be able to see the code
- i think. it's the same procedure as with the pear-packages :)

regards
SH


If the code is readable by the browser but no one else, that should do
it. Make sure it's permissions are set to exclude world read.

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

Jul 17 '05 #4
*** Michael Vilain <vi****@spamcop.net> wrote/escribió (Wed, 15 Sep 2004
15:35:54 -0700):
If the code is readable by the browser but no one else, that should do
it. Make sure it's permissions are set to exclude world read.


The original poster isn't concerned about regular system users seeing the
code--what she doesn't want is that webmasters can see the source code!
--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
--
Jul 17 '05 #5
"Michael wrote or quoted:
If the code is readable by the browser but no one else, that should do
it. Make sure it's permissions are set to exclude world read.


*Normally* the browser is on the client - and PHP files are on the server.
--
__________
|im |yler http://timtyler.org/ ti*@tt1lock.org Remove lock to reply.
Jul 17 '05 #6

"karolina" <ra********@hotmail.com> wrote in message
news:c8**************************@posting.google.c om...
Hi,

I have a webserver which some user have their own accounts on. I want
to provide the users with some public classes which they may use use
when they are making there own php code placed in their own
directories.

I want the code to be accessable via an interface (like h-files in c)
but I do not want my code to be viewable to the users which are using
my classes. Very much like a library or something.
How do I make php code which are hidden but are free to use by my
users with a defined interface against my classes?


Your source code needs to be processable by the PHP compiler.
But, you don't want your code-users to "see" it.
This is an unsolvable problem when stated this way.

What you can do is to obfuscate the source code you want them
to use. This enables them (and the compiler) to see the public interface,
and to "see" the class bodies, but if the class bodies
are sufficiently obfuscated, it won't do them much good
to see it.

See http://www.semanticdesigns.com/Produ...bfuscator.html.
--
Ira D. Baxter, Ph.D., CTO 512-250-1018
Semantic Designs, Inc. www.semdesigns.com
Jul 17 '05 #7
might be you can put the script in the include directory and use zend to
encode it~
"Ira Baxter" <id******@semdesigns.com> ¦b¶l¥ó
news:ci********@enews1.newsguy.com ¤¤¼¶¼g...

"karolina" <ra********@hotmail.com> wrote in message
news:c8**************************@posting.google.c om...
Hi,

I have a webserver which some user have their own accounts on. I want
to provide the users with some public classes which they may use use
when they are making there own php code placed in their own
directories.

I want the code to be accessable via an interface (like h-files in c)
but I do not want my code to be viewable to the users which are using
my classes. Very much like a library or something.
How do I make php code which are hidden but are free to use by my
users with a defined interface against my classes?
Your source code needs to be processable by the PHP compiler.
But, you don't want your code-users to "see" it.
This is an unsolvable problem when stated this way.

What you can do is to obfuscate the source code you want them
to use. This enables them (and the compiler) to see the public interface,
and to "see" the class bodies, but if the class bodies
are sufficiently obfuscated, it won't do them much good
to see it.

See

http://www.semanticdesigns.com/Produ...bfuscator.html.

--
Ira D. Baxter, Ph.D., CTO 512-250-1018
Semantic Designs, Inc. www.semdesigns.com

Jul 17 '05 #8
Nel
"Ira Baxter" <id******@semdesigns.com> wrote in message
news:ci********@enews1.newsguy.com...

"karolina" <ra********@hotmail.com> wrote in message
news:c8**************************@posting.google.c om...
Hi,

I have a webserver which some user have their own accounts on. I want
to provide the users with some public classes which they may use use
when they are making there own php code placed in their own
directories.

I want the code to be accessable via an interface (like h-files in c)
but I do not want my code to be viewable to the users which are using
my classes. Very much like a library or something.
How do I make php code which are hidden but are free to use by my
users with a defined interface against my classes?


Your source code needs to be processable by the PHP compiler.
But, you don't want your code-users to "see" it.
This is an unsolvable problem when stated this way.

What you can do is to obfuscate the source code you want them
to use. This enables them (and the compiler) to see the public interface,
and to "see" the class bodies, but if the class bodies
are sufficiently obfuscated, it won't do them much good
to see it.

see http://www.zend.com/store/products/z...uard-suite.php

It's not cheap, but it's very good.

Nel.
Jul 17 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by MOHSEN KASHANI | last post: by
7 posts views Thread by FP | last post: by
6 posts views Thread by Ralph | last post: by
6 posts views Thread by Doogie | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.