Posted by Jerry Stuckle on 04/13/07 13:04
Toby A Inkster wrote:
> bleen wrote:
>
>> system("/srv1/path/to/php /path/to/script.php ".$arg1." ".$arg2." > /
>> dev/null &");
>> system("/srv2/path/to/php srv1/path/to/script.php ".$arg1." ".$arg2."
>>> /dev/null &");
>
> Ummm.... those will still run on the same server.
>
> What you could do would be:
>
> <?php
> $r1 = file("http://server1/path/to/script.php?arg1={$arg1}&arg2={$arg2}");
> foreach ($r1 as $R) print $R;
> $r2 = file("http://server2/path/to/script.php?arg1={$arg1}&arg2={$arg2}");
> foreach ($r2 as $R) print $R;
> ?>
>
But they'll still be processed sequentially, not in parallel.
You would want to start the scripts as above, but have run the processes
on other machines, i.e. with rsexec or similar.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|