sending back variables to a client



From the sounds of it, the problem it is having is when you access it through http it parses it up as a regular webpage request, and it is not actually giving you the php code, but the html page.

Perhaps try one of these options:

1) Set the code up as a web service (I've never done anything like this).
2) Instead of a .php script that contains the function, you could name it something that the web server isnt' going to parse as a web page. Such as a .txt file. This may work, but your could would then be accessible to everyone that goes to the requested page.
3) Use something like ftp functions to retrieve the file from one server to another and then open the file.
4) Make the included script an actual program where you pass in the result via get variables and it gives you back a result. One way to retrieve result would be through a session variable.
5) Just copy the file to both servers.

I'm not sure if any of these would work for you, but they are a few suggestions.

Good luck!
try something like thsi
copy("http://path/to/other/server/function.txt", 'functionabcd.php');
include ('functionabcd.php');
unlink ('functionabcd.php');

what it does copies the file function.txt from other webserver, saves as .php file and parses it when included and everything is available

actually this worked for my post.. yesterday
remeber you can't have the scope of the variables on the other server to other server you try to include...

this is something i found while trying solve the problem of having a function on other server available on some other server