Hi Readers,

Heres what i'm trying to achieve:

A script, that uses multiple fsockopen()'s and simltaniously get feedback
from each socket from fget()s. Now, since using a single fget() needs to be
in a loop then it's not possible to have more than one loop going at the
same time.

I was thinking of using a break command, then getting feedback from the
other loops, and breaking each of them inside a encapsulating loop -
however, this is VERY ineffective.

What I thought about doing was just using the same script launched multiple
times, so it has diffrent proccesses running and therefore would be able to
complete the task of having multiple loops running at the same time on the
same system.

The problem I've found out is that on Unix (the desired OS breed), PHP can't
be forked - so using a start.php script to execute multiple system() calls
wouldn't work becuase PHP waits till the system() function has finished
before carrying on with the rest of start.php.

i.e. The following won't work:


PHP:------------------------------------------------------------------------
------
for ($i = 0; $i < 5; $i++) {
  system ("/path/to/php /path/to/script.php &");
}

----------------------------------------------------------------------------
--

Basically, i'm asking if anyone has a work around, or alternativley a answer
to my problem?

I'd much appritiate it, or any help you can contribute.

Thanks in advance, or for atleast reading to this point

-Damien


begin 666 smile.gif
M1TE&.#EA#P`/`+,.`+R[N\;%Q?+R\L' P/S\_.SL[,S+R]+1T??W]]_?W^;F
MYMG8V/___P```*2DI ```"'Y! $```X`+ `````/``\```16T$G9:IW85<;Y
MQ0TACF,S-4BJKHBI"4(%QPUL-D5>Y<6N-XJ@<"BL)([()+*R:#J?SLKAT)A:
BIU6JQF!H<+_>+B5 ME3(`9=FP&ZWU90&8#[_9#3F3 0`.P``
`
end


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to