I have array, for example:
$links = array(
'http://aaa.com/data.txt',
'http://aaea.com/data.txt',
'http://aada.com/data.txt',
'http://agaa.com/data.txt',
'http://ahaa.com/data.txt',
'http://awha.com/data.txt',
'http://aaeha.com/data.txt',
//etc x100
);
And in PHP I am doing:
foreach ($links as $link) {
$data = file_get_contents($link);
//save data in database
}
It works fine, but terribly slow. How is better way for this with PHP? I would like get data asynchronous.
My other way - jQuery and Ajax queries from PHP script, but maybe exists better way?