Reply to Re: splitting a script over two servers

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация