wouldn't that be very dangerous if someone could grab my code and run it on their server?

i'm an intermediate php guy at best. for many reasons i would not want someone including my files and running them on another server!!! i hope there's no easy way to do that!!!!!

btw if files are outside of the route directory then that means only the local files can all them and execute them, right??

thanks
tony


-------------------------------------------------------------------------------- My email address has changed. It is now [EMAIL PROTECTED] Visit my website ----- Original Message ----- From: "Micah Stevens" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <php-db@lists.php.net>
Sent: Monday, April 02, 2007 4:20 PM
Subject: Re: [PHP-DB] Include function across servers


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


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

Reply via email to