0

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
/home/mywebsi/public_html/folder1/folder2/index.php

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

Thank you.

4
Contributors
7
Replies
8
Views
7 Years
Discussion Span
Last Post by digital-ether
0

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

0

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.

0

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.

0

'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.

0

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.