SiriusB
11-15-2007, 06:26 PM
Hi there
I have been developing a script to collect Folding@Home stats for my team and present them in a weekly news post. The script works just fine using a local copy of the official F@H stats file.
However, for the script to function properly I need to access/download the stats file from the F@H website at least once a week. Unfortunately this stats file is pretty damn big - about 18mb if I recall.
At the moment I have used the file() function in PHP to stick the file into an array. The problem with this is the script sits there for some time while it downloads the data.
I don't mind the download time as such, it is the complete lack of information given to the user. Is it possible to create a progress bar for the download, so at least we know what is happening?
If that is not possible, is there a way to parse a file line by line when it is not held locally? Due to its size [840,000 lines] it takes up a lot of memory and doing it a line at a time would keep memory usage down.
The file in question is here: http://fah-web.stanford.edu/daily_user_summary.txt
I have been developing a script to collect Folding@Home stats for my team and present them in a weekly news post. The script works just fine using a local copy of the official F@H stats file.
However, for the script to function properly I need to access/download the stats file from the F@H website at least once a week. Unfortunately this stats file is pretty damn big - about 18mb if I recall.
At the moment I have used the file() function in PHP to stick the file into an array. The problem with this is the script sits there for some time while it downloads the data.
I don't mind the download time as such, it is the complete lack of information given to the user. Is it possible to create a progress bar for the download, so at least we know what is happening?
If that is not possible, is there a way to parse a file line by line when it is not held locally? Due to its size [840,000 lines] it takes up a lot of memory and doing it a line at a time would keep memory usage down.
The file in question is here: http://fah-web.stanford.edu/daily_user_summary.txt