Currently i am using curl to download a file. It stores all the content of file in a variable then write locally using fwrite function. It does the task successfully but with one limitation that is when large file is being downloaded it gives no indication to user about how much file is downloaded locally.

So, I am looking for some way so that file can be downloaded in parts or writing locally after every 10mb (or whatever) is downloaded.

Your help is appreciated.

Thanks.