I have a script that runs on a server (call it Server A) and it does essentially 3 things:
(1) it connects to a MySQL db & selects a row from a table,
(2) sets a session variable with certain data from the selected row, and
(3) writes dynamic html and content that includes the value in the session variable.
To minimize replicating the script on another server (call it Server ? and keep both sets of script in sync with each other, I want to access the source script on Server A from unrelated Server B and have the script run as defined above and deliver the same dynamic output to Server B.
I know the include() function doesn’t do this for me. Is there a way to make this happen without having to replicate the PHP script and the MySQL tables & rows on both servers?
Thanks for your help.