|
Posted by Rami Elomaa on 04/12/07 18:36
bleen kirjoitti:
> can someone point me in the right direction here..
>
> I have a script (essentially a giant for loop) that takes about 20
> mins to run on my server. I want "split" this process onto a second
> server by doing something like this:
>
> 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 &");
>
> ideas? thoughts? questions? comments? concerns? jokes?
>
Well, here's an idea. I'm not saying it's a good idea.
<?php
if($_GET['first']) {
system("/srv1/path/to/php /path/to/script.php ".$arg1." ".$arg2." > /
dev/null &");
} else if($_GET['second']) {
system("/srv2/path/to/php srv1/path/to/script.php ".$arg1." ".$arg2."
> /dev/null &");
} else {
?>
<html>
<body>
<img src="<?php echo $_SERVER['PHP_SELF'] ?>?first=1" />
<img src="<?php echo $_SERVER['PHP_SELF'] ?>?second=1" />
</body>
</html>
<?php } ?>
--
Rami.Elomaa@gmail.com
"Wikipedia on vähän niinq internetin raamattu, kukaan ei pohjimmiltaan
usko siihen ja kukaan ei tiedä mikä pitää paikkansa." -- z00ze
Navigation:
[Reply to this message]
|