Reply to Re: Multithreading/Parallel Processing with PHP

Your name:

Reply:


Posted by Colin McKinnon on 09/30/05 12:08

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.

[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

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