Currently I use an array with values from 1 to 100 roughly. For each value the array performs an fsock action where it goes to another site and collects a small bit of data. Currently it takes roughly 2 mins to perform these 100 actions. Is there any way i can get the script to do this quicker?
I did think of a way where you could split the original array into 5 new ones with only 20 numbers in each. Would this cut the processing time by 5 (i.e. by the 5 programs running at once)?
If so, how could i get the five programs to run at once?
I thought about using:
although wouldn't this just run the first array and wait for the result, then run the second one (and therefore not being quicker at all)?PHP Code:<?
include ("array1.php");
include ("array2.php");
...
?>
cheers


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks