A
Anonymous
Guest
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!
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!