Re: "blackboxing" my global functions

From: Date: Mon, 23 Oct 2000 09:38:30 +0000
Subject: Re: "blackboxing" my global functions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21752@lists.php.net to get a copy of this message
It won't be parsed at all, and the fopen method below will print the source. Only way to protect the files is to wait for the compiler that is due somethime in November. --Niklas ----- Original Message ----- From: "Tim Parkin" <Tim.Parkin@didio.com> To: <Lawrence.Sheed@dfait-maeci.gc.ca>; <mstearne@entermix.com>; <huntsman@hermes.nisu.flinders.edu.au> Cc: <theoj@transport.com>; <php-general@lists.php.net> Sent: Monday, October 23, 2000 10:33 AM Subject: RE: [PHP] "blackboxing" my global functions > sureley when you read the file it will be parsed by the apache server so the > client will only read httml (and not much if the php is written to not self > run, ie chekc on a variable passed from the main script and if it's not > there then print nothing) > > Tim Parkin > > -----Original Message----- > From: Lawrence.Sheed@dfait-maeci.gc.ca > [mailto:Lawrence.Sheed@dfait-maeci.gc.ca] > Sent: Monday, October 23, 2000 04:16 > To: mstearne@entermix.com; huntsman@hermes.nisu.flinders.edu.au > Cc: theoj@transport.com; php-general@lists.php.net > Subject: RE: [PHP] "blackboxing" my global functions > > > It won't work though. > > If the files are accessible by Apache (and php by because apache runs it) > then they can just do a file open, read into a string and print. > > eg: > > $filename = "your_secret_file_here.php"; > > $fd = fopen( $filename, "r" ); > $contents = fread( $fd, filesize( $filename ) ); > fclose( $fd ); > print ($contents); > > -----Original Message----- > From: Michael Stearne [mailto:mstearne@entermix.com] > Sent: October 23, 2000 11:13 AM > To: David Robley > Cc: Theodore Jones; PHP General List > Subject: Re: [PHP] "blackboxing" my global functions > > > That is a good idea. > > David Robley wrote: > > > On Mon, 23 Oct 2000, Theodore Jones wrote: > > > Hello, > > > > > > I act as my own full-service hosting and design company and I use PHP in > > > some of my site designs. > > > > > > I have spent considerable time on some of my functions and such which I > > > generally like to put into an include file which can be accessed by all > > > pages "globally" within the site. What I am wondering is, how can I > > > "black-box" this global function include file such that it is protected > > > from the site "owners" FTP'ing in and downloading/viewing, but is > > > still > > > accessible through the HTTP interactions to pump out HTML to the > > > browser? > > > > > > In a sense I consider the PHP programming I have done my "investment" > > > and "property" and not a part of the design of the site sold to the > > > client, so I seek to protect my investment and keep them from just > > > running off with my code and hosting on a different server. > > > > > > If anyone has any ideas (perhaps I'm missing something obvious as a > > > solution), please advise. > > > > > > Thanks in Advance, > > > > > > ~ Theo > > > > Put your include files in a directory that is not under the web root, and > > that can't be accessed via ftp except by the good guys. > > > > -- > > David Robley | WEBMASTER & Mail List Admin > > RESEARCH CENTRE FOR INJURY STUDIES | ¸EË7 > > “Ûʓ։2lhttp://www.nisu.flinders.edu.au/ > > AusEinet | > > http://auseinet.flinders.edu.au/ > > Flinders University, ADELAIDE, SOUTH AUSTRALIA > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#21752) next »