How you grab the file is up to you. cURL, fopen and so on.
What I advise is that you do it in two operations. 1) Grab the file, store it. 2) Read the file, parse it and the store the desired output ready to be used in your pages.
That way if the first part goes wrong, latency issues for example, then you can at least revert back to using old data.
That first part can be done say, hourly with a cron job.
What you want to avoid is a situation where you call a script which has to do all of these things one after the other without failure:
*connect to the external server
*grab the file
*display the output