I think what I'm going to end up doing, is using a perl CGI script to do
this part. I /know/ perl can do it easily, and I won't have to hack
together my own threading code.

Thanks for the suggestions though.

Matthew Walker
Senior Software Engineer
ePliant Marketing

-----Original Message-----
From: Richard Archer [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, April 14, 2002 6:41 PM
Subject: Re: [PHP] Multiple Threads?

At 9:25 PM -0600 13/4/02, Matthew Walker wrote:

>I don't remember the name of the module offhand, but once upon a time,
>used a perl module that would fork multiple threads so that you could
>execute several web queries at the same time. This saved a lot of time,
>if, for instance, you had to get information from UPS, FedEx, and the
>USPS about shipping rates to display on a page. If you had to query
>one at a time, the delay would be unacceptable. However, with that perl
>module, you could query them all at the same time, making it much

You could system() or shell_exec() an external program/script which
forked off 3 children to perform the queries. You would then need to
parse the script output for the data you need. system() would require
you to capture the script output via output buffering.

If you want to use a CGI version of PHP as the external program the
functions described at http://www.php.net/manual/en/ref.pcntl.php are
what you need.

This is a very neat idea. I hope I remember this when I need it :)


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

Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.345 / Virus Database: 193 - Release Date: 4/9/2002

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

Reply via email to