Executing An App From the server, please help!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
thundershadow14
Forum Newbie
Posts: 3
Joined: Tue Nov 15, 2005 7:46 pm

Executing An App From the server, please help!

Post by thundershadow14 »

I was just wondering if there was anyway I could execute a local app off the remote server. For example, if I were to goto http://www.myscript.php
Is there anyway i could get that script to execute c:\myapp.exe? If anyone knows how to get this done, could you reply ASAP.

-Chad
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

thundershadow14
Forum Newbie
Posts: 3
Joined: Tue Nov 15, 2005 7:46 pm

Right..

Post by thundershadow14 »

Right, I know about this function...but isnt it limited to running programs on the server? remember I want the server to run an application from MY machine at home.


-Chad
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Re: Right..

Post by Roja »

thundershadow14 wrote:Right, I know about this function...but isnt it limited to running programs on the server? remember I want the server to run an application from MY machine at home.
Sorry, that wasn't clear from the original wording, since you said "execute a local app off the remote server".

I do not believe it is possible for a website to execute a program on your machine when you visit the page. Just think of the danger of a website running "format.com" on your machine.

It almost sounds like you are looking for a GotoMyPc.com kind of program?
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

You would need to write a script that runs on YOUR pc, that listens on a port, the server would connect to the port and send instructions for your pc to run. the script running on your pc would need to authenticate incoming commands. Easy way to do this is install php on your machine and write a simple tcp/ip server using the socket functions.
thundershadow14
Forum Newbie
Posts: 3
Joined: Tue Nov 15, 2005 7:46 pm

Hmmm

Post by thundershadow14 »

Hypotheically speaking though, If my internet server was a windows machine, wouldnt it be possible to say; start a service on my home machine from the server via sc.exe, using my IP as the "remote server field". This is assuming the the executable service is already installed on my home machine ofcourse.
Post Reply