Jump to content


Photo

checking to see if a program is running


  • Please log in to reply
4 replies to this topic

#1 scriptersx

scriptersx
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 17 April 2006 - 03:54 AM

im making a script for my lan and i want to be able to use php to start/stop different programs vnc,vlc etc. I know how to get them to start, and i can make a bat and run that to stop them but i want to check if they are running so i dont make double instances etc, and ideas how i could do this and use the information in my page

#2 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 17 April 2006 - 11:22 PM

As far as I know, PHP can't mess with files or programs...
You should try a desktop app...
~ D Kuang

#3 DJMurtz

DJMurtz
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 17 April 2006 - 11:52 PM

Yes you can with php.

Check: [a href=\"http://www.php.net/manual/en/function.proc-get-status.php\" target=\"_blank\"]http://www.php.net/manual/en/function.proc-get-status.php[/a]

#4 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 18 April 2006 - 12:31 AM

I am afraid you can't, these functions are for programs being executed by the server if I am not wrong...
So, you can't simply use it in Windows, for example;
~ D Kuang

#5 DJMurtz

DJMurtz
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 18 April 2006 - 12:46 AM

[!--quoteo(post=365781:date=Apr 18 2006, 02:31 AM:name=poirot)--][div class=\'quotetop\']QUOTE(poirot @ Apr 18 2006, 02:31 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
I am afraid you can't, these functions are for programs being executed by the server if I am not wrong...
So, you can't simply use it in Windows, for example;
[/quote]

I was asuming the topic starter was talking about a server he was running on his PC. Obviously PHP is serverside and can't run/detect programs clientside. If the server is running localy then you can do this, even in windows.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users