I'm not totally clear on what you're asking, so here's two options:
If you use the include() function, you're pulling the code from the
external server and running on the local server. If you're running an
HTTP call, say via an Ajax routine for example, the code runs on the
external server.
The difference is if you're grabbing the source from the external server
and running it on the local php interpreter, or if you're using the
external php setup.
This seems to be what you're asking, the answer in this case is, either
one could happen, it depends on your implementation. If you provide
details on the exact implementation then I can give a more exact answer.
HTH,
-Micah
On 04/02/2007 06:53 AM, ioannes wrote:
I ask this as I do not have two web sites on different servers to test
at the moment.
Does it work to use an include function in the php code on one site
that calls a function on the other site? If you include a file on a
remote server that runs a function, where does the function run - on
the server where the function is originally written or on the calling
server? I am thinking that if I write code, it is one way to make the
functionality available without actually disposing of the source code
itself.
So the included functions might be variable values. Eg you could pass
back a whole calendar to the calling server, which then just prints on
the calling web site just by printing the returned variable. (I know
that in terms of getting data to mark up the calendar the database
would need to be fully referenced: user, password, server, and the
calling (shared) host for instance will ask for the remote IP address
to add to a white list.)
John
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php