Page 1 of 1

Problem

Posted: Wed Jul 20, 2005 5:40 pm
by zeurois
Hi. I have a web server(windows machine) and i need to logon with a real username(eg. Administrator). Then i want to run executables as the user account from the remote machine(i don't know if i use the right words..). The file must run on the server side...and the platform needs to be php/mysql made(of course, not the logon system)...Is this possible?

Mail me please for further dicussions.

Thanks a lot...it's urgent.

Posted: Wed Jul 20, 2005 6:18 pm
by Chris Corbyn
If it's urgent a more fitting title than "Problem" may have got a faster response.

You can login via Telnet or SSH (I believe there are 3rd party SSH servers for windows) and then execute commands like you're on the local machine.

Using PHP you have access to the shell functions:

http://www.php.net/system
http://www.php.net/exec
http://www.php.net/passthru

This syntax also works:

Code: Select all

$result = `executable_program.exe`; //Note the backticks

Posted: Thu Jul 21, 2005 1:01 pm
by zeurois
thank you very much..and how do you stop a running service or program?