Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- PHP and windows
April 14, 2009, 4:48 pm
rate this thread
this system we run shoutcast and sam broadcaster to stream out a radio
show. Sometimes sambroadcaster (a dos program) restarts and causes
shoucast to stop. Is there a way in php to determine if a program is
running on a windows xp server and if not restart it?
Re: PHP and windows
This sounds like you need to figure out how to configure "sam
broadcaster" properly, in which case, this is not a PHP issue.
Failing that, you can use PHP's program execution functions to run
The command I'd use to determine which processes are running is
`tasklist`. Run `tasklist /?' on a Win32 shell terminal to figure
out how to use it. The closest POSIX/UNIX equivalent would
probably be `ps'.
To (re)start the server, look up the documentation for it, which
should explain how to start from the command line. Once you
determine this, you can just use the program execution functions in
PHP for your problem.
I'm not sure I follow you. The task scheduler wouldn't do anything
by itself, you still have to have a program that does something.
Judging by the OP's issue
$email = str_replace('sig.invalid', 'gmail.com', $from);
Anonymous (1984 IOCCC winner):