Possible Duplicate:
including php file from another server with php
Every php programmer knows that the include() function of php is used to include a php file in another php file,but i want to know that is it possible to including a php file which resides in a different server.i.e. suppose i want to include a.php in b.php now suppose a.php and b.php resides in different server,in that case is it possible to include a.php in b.php?
I think you’re seeing it from a wrong point of view. Most of the time you’ll don’t want to merge PHP files from different servers – for this, you have other technologies used to do that.
If you want to include a file from another server, and fetch the source code, you’ll need a permission to do so and, let’s say once you have a permission you can simply copy the source code to your server.
However, if you want to communicate between the files that’s not the method. You can use AJAX, JSON and GET parameters to communicate (and probably many other methods).