I have server 'A' and server 'B'
I am trying to find a way to have a php script on server'A', run a small php script that is on server 'B'.
I have looked at the php manual, looked in a couple of books, as well as a search on Google but I can't find anything that I can get working.
I guess one problem is that I don't understand the syntax of the functions such as exec(), system(), or passthru().
Most of the examples that I have found seem to be running a script on the same server as the calling script.
For example the php manual shows the system() function syntax as:
then for an example it shows:
I believe that this is supposed to display a directory listing.
I'm not sure what the $command should be for running a script on a remote server. I tried using the following:
The script, 'move_file.php', is just a small script to move a file from one folder to another on server'B' for testing purposes.
The above attempt does not work and using a similar $command does not work with exec() either. I guessing my syntax for calling the script on server 'B' is way out of whack.
So, question (1) is: Which is the best function to achieve my goal
question (2) is: What is the proper syntax to use? (example code?)