Reputation: 2147
Using PHP, exec('php test.php');
will execute a separate PHP script on the command line.
What if test.php
lives on another server, but within the same network? Can I specify that server's local IP address for the shell command to be run? What about a remote IP address? I could always install Apache on the second server and call the remote script via http, but would like to avoid that if possible.
Thanks, Brian
Upvotes: 0
Views: 302
Reputation: 85458
I can think of two options:
Use exec()
to execute a program that connects to this other server and does whatever.
Set up a web service on the receiving server, and have the sending server send a request.
Regardless of what you choose to do, you'll need some setup on the receiving end, for the obvious reasons Dan Grossman pointed out.
Upvotes: 1