Hi I have a linux machine with apache server and php and I would like to make a call to a remote file "executable file" that is located on a windows machine in my network. Can you please advice me? Thank you
lammert
11:26 am on May 23, 2010 (gmt 0)
This is not an easy job, both from a technical point of view, and looking at security.
There are mainly two options. One is to let the windows machine understand web calls by installing Apache and PHP on that computer. The other option is the let the linux computer have some sort of command-line access to the Windows machine. Some Windows version were shipped with a Telnet server program if I remember correctly which might fit the job. Otherwise you have to install some third party network access software on the Windows system.
Which solution to choose depends on the way both computers are now used--local traffic or serving global internet requests--the way the Windows executable works and if and how you want to open the Windows machine for executable calls from other computers.
All solutions where you open up a Windows computer to call an executable over the network have considerable security issues and you should think twice if you want to implement this on a system which has global internet connectivity.
TheMadScientist
9:21 pm on May 23, 2010 (gmt 0)
If you have control over the remote file you could possibly save it as a .txt file so it is not processed when opened by the Windows box and include it in the PHP on the Linux box so it will be run locally... Just an idea and you should be very careful about security in this type of situation, but it could be possible to make it work this way.
gabidi
4:40 pm on May 24, 2010 (gmt 0)
You can simply CURL a secure script on the remote server and pass the vars required through post/get. You can then execute/fork the required program using the remote script. Its the "easiest" and most secure way of doing it.