Connecting Tech Pros Worldwide Help | Site Map

hide php code

karolina
Guest
 
Posts: n/a
#1: Jul 17 '05
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?
Alvaro G. Vicario
Guest
 
Posts: n/a
#2: Jul 17 '05

re: hide php code


*** karolina escribió/wrote (15 Sep 2004 11:39:22 -0700):[color=blue]
> 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?[/color]

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
--
Stefan Hegenbart
Guest
 
Posts: n/a
#3: Jul 17 '05

re: hide php code


karolina wrote:
[color=blue]
> 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?[/color]

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
Michael Vilain
Guest
 
Posts: n/a
#4: Jul 17 '05

re: hide php code


In article <2qrp5oF12q512U2@uni-berlin.de>,
Stefan Hegenbart <ich@hegi.info> wrote:
[color=blue]
> karolina wrote:
>[color=green]
> > 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?[/color]
>
> 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[/color]

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



Alvaro G Vicario
Guest
 
Posts: n/a
#5: Jul 17 '05

re: hide php code


*** Michael Vilain <vilain@spamcop.net> wrote/escribió (Wed, 15 Sep 2004
15:35:54 -0700):[color=blue]
> 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.[/color]

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
--
Tim Tyler
Guest
 
Posts: n/a
#6: Jul 17 '05

re: hide php code


"Michael wrote or quoted:
[color=blue]
> 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.[/color]

*Normally* the browser is on the client - and PHP files are on the server.
--
__________
|im |yler http://timtyler.org/ tim@tt1lock.org Remove lock to reply.
Ira Baxter
Guest
 
Posts: n/a
#7: Jul 17 '05

re: hide php code



"karolina" <rallykarro@hotmail.com> wrote in message
news:c8a98246.0409151039.6d09a01c@posting.google.c om...[color=blue]
> 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?[/color]

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


Matthewtung
Guest
 
Posts: n/a
#8: Jul 17 '05

re: hide php code


might be you can put the script in the include directory and use zend to
encode it~
"Ira Baxter" <idbaxter@semdesigns.com> ¦b¶l¥ó
news:cihrev0snr@enews1.newsguy.com ¤¤¼¶¼g...[color=blue]
>
> "karolina" <rallykarro@hotmail.com> wrote in message
> news:c8a98246.0409151039.6d09a01c@posting.google.c om...[color=green]
> > 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?[/color]
>
> 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[/color]
http://www.semanticdesigns.com/Produ...bfuscator.html.[color=blue]
>
>
> --
> Ira D. Baxter, Ph.D., CTO 512-250-1018
> Semantic Designs, Inc. www.semdesigns.com
>
>[/color]


Nel
Guest
 
Posts: n/a
#9: Jul 17 '05

re: hide php code


"Ira Baxter" <idbaxter@semdesigns.com> wrote in message
news:cihrev0snr@enews1.newsguy.com...[color=blue]
>
> "karolina" <rallykarro@hotmail.com> wrote in message
> news:c8a98246.0409151039.6d09a01c@posting.google.c om...[color=green]
> > 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?[/color]
>
> 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.
>[/color]
see http://www.zend.com/store/products/z...uard-suite.php

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

Nel.


Closed Thread