Accessing function file on another domanin

From: Mike Harvey (spam_at_spam.com)
Date: 10/27/04


Date: Wed, 27 Oct 2004 17:05:24 GMT

I want to be able to access the functions located in a file on site A
from site B without the person who owns site B being able to see the
code in the function.

Examples:

This works:
<?PHP
include_once("http://site_a.com/function_file.inc");
echo my_function();
?>
However, simply going to http://site_a.com/function_file.inc in a
browser will show you the code that makes the function work.

This doesn't work:
<?PHP
include_once("http://site_a.com/function_file.inc.php");
echo my_function();
?>
Calling http://site_a.com/function_file.inc.php directly with a
browser will not give you anythin - which is what I want. However,
anything that the above called file actually "does" works but any
functions declared in it are not available to the code that called it.

Any ideas?



Relevant Pages

  • Re: php echo in php-only file
    ... You cannot get what you passed to user's browser. ... 2nd php will analyze and read data as you wish ... > html for nice echo outputs to screen, I pass control to another php-only ... > display in the html file that I expect is still on-screen in the user's ...
    (php.general)
  • Re: database dumping on browser
    ... echo "hi"; ... window but not on the browser. ... More over other php codes not having ... folder and all other configuration things. ...
    (comp.lang.php)
  • Re: Cant include a class php.
    ... echo 'hi3'; ... The browser shows only "hi3". ... public function __construct ...
    (comp.lang.php)
  • Re: Cant include a class php.
    ... echo 'hi3'; ... The browser shows only "hi3". ... public function __construct ...
    (comp.lang.php)
  • Re: Cant include a class php.
    ... echo 'hi3'; ... The browser shows only "hi3". ... public function __construct ...
    (comp.lang.php)