You are here: Re: Multithreading/Parallel Processing with PHP « PHP Programming Language « IT news, forums, messages
Re: Multithreading/Parallel Processing with PHP

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

 

Navigation:

[Reply to this 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

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