Im working on script that integrates online shops.
I have code like this (simplified):
// $asImageurls - array of string with image url's
foreach($asImageurls as $sImageUrl)
{
$imageContent = @file_get_contents($image);
// create filename, save image etc.
}
Connecting with remote server, downloading image takes a lot of time, and this is not good when I have like 500 products to import.
I was thinking about some parallel downloading, but I don't know how to start.
What can I do, to make it faster?