So here is what I would like to achieve, I currently have 2 servers one of the servers has a script installed on it that is a pretty nice script, I would like to be able to run this script on both server while it is only installed on one server.

So basically I need to figure out how to call the script from server 1 so that it will work for server 2 as well.

The reason I want to do this is so that there is only one database and so that I only have one installation of this script.

The script on server one is called by using something like this

Please keep in mind that I am a php novice, I am still working on learning the language so examples are appreciated.

Thank you.

9 Years
Discussion Span
Last Post by digital-ether

Any reason you want 2 servers?
You could just do an proxy, using curl, or set the nameservers of the domain to the same server, using that domain's document root the same as the others...

Edited by codejoust: n/a


The reason that we use 2 servers is that one of our servers has been around for a while and it already gets a good amount of traffic, we are setting up a similar site and are using a different server for it.


Is the script based off of 1 database? Flat file etc... Is it opensource?
If so, you can duplicate the php files on both servers, and set it to use the same database (unless you want to use different data).
If you have the current site and new site, that would be helpful.


'file_get_contents()' will get the output of the script (into a string variable). However, if "allow_url_fopen" in your ini file is set to NO, you'll probably need to use something like CURL.


allow_url_fopen is turned off how would I go about using the curl option?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.