Is it possible, to include PHP code in a separate file on another computer. If so, how?
For example:
On the first computer:
#Host 1 Script
$username = "dfgd";
$password = "sdff";
#Code I need help with
And then on the second:
#Host 2 Script
#Code which needs to be run on Host 1 which will manipulate $username and $password
Obviously, I would not be able to store the script on Host 2 in a .php file because when it is read, nothing would print out… But is it possible?
As long as reading files over HTTP is enabled in the server, you can use
include*()orrequire*()to read the file and execute the returned PHP. Simply tell the other system to not parse it in their PHP engine.