|
Posted by Schroeder, AJ on 09/30/05 19:01
"Colin McKinnon" <colin.deletethis@andthis.mms3.com> wrote in message
news:dhiva9$lsh$1$8300dec7@news.demon.co.uk...
> Chris Hope wrote:
>
>> Schroeder, AJ wrote:
>>
>>> I have googled this topic and I know this has been asked before, but
>>> there seems to be no good answer except "PHP doesn't support
>>> multi-threading" I am new to PHP so I might be using the wrong
>>> terminology.
>>
>> That is correct. PHP has no support for multi threading.
>>
> <snip>
>>
>> You can fork a process using the PHP CLI (assuming you're on a *nix box
>> and it soundsl ike you probably are) like you can with most other
>> scripting languages.
>>
>
> Or you (if you're not interested in the process after it starts) can ask
> the
> OS to start up a new process, even if it's only web accessible:
>
> for ($x=0; $x<count($devices); $x++) {
> $url="http://localhost/snmp_grab.php?dev=" . $device[$x];
> $cmd="curl '$url'"; // or {"php -q /docroot/snmp_grab " .
> $device[$x]}
> // or lynx, or w3m, or ...
> `echo "$cmd" | at now`;
> }
>
> HTH
>
> C.
That won't work for my backup scripts, but that'll work for another web app
that I am writing...
Great suggestion! Thank you!
AJ Schroeder
[Back to original message]
|