Does anyone know what the best (or a really good) way is to load external files (about 10-20) from an api with performance in mind. Each session has different content. Currently I try “file_get_contents” but experience serious performance issues. I’m not really familiar with Curl but it seems performance wise to beat the good old PHP way. Any ideas/examples?
Share
You could also use curl multi to grab multiple files at once, there is a tutorial here:
http://www.phpied.com/simultaneuos-http-requests-in-php-with-curl/
Or curl php docs http://www.php.net/manual/en/function.curl-multi-init.php