On Tuesday 14 May 2002 23:00, 1LT John W. Holmes wrote:
> From: "Stuart Dallas" <[EMAIL PROTECTED]>
>
> > Collins, Robert <[EMAIL PROTECTED]> wrote:
> > > Put something like this in the top of each of the pages that have
> > > common functions
> > >     <PSUDO CODE>
> > >         if(file_exists("/path/to/file/core_functions.php")){
> > >             $core_functions = "/path/to/file/core_functions.php";
> > >         }else{
> > >             $core_functions =
> > > "http://www.domain.com/path/to/file/core_functions.php";;
> > >         }
> > >     require_once($core_functions);
> > >     <PSUDO CODE>
> >
> > If the code can get core_functions.php from your server, so can they!! A
> > legal agreement is the only way to go.
>
> Not to mention that if you pull a .php page through HTTP, like you're
> doing, you're going to get the parsed result, not the PHP code.

That's exactly what you need :) Have some core functions that are remotely 
accessed.

for example:

$result = file("http://www.myserver.com/functions/square_root.php?input=4";);

Then at www.myserver.com the square_root.php file would contain:
<?
  echo sqrt($input);
?>

Does anyone see any flaws in this?
-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
We'll cross that bridge when we come back to it later.
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to