I need to know how to get the status of the copy() function in PHP.
I am using this function to download a remote file, and I want a progress bar for this program.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ll need to write your own copy function. First check the file size through a HTTP HEAD request, for example with this solution:
http://php.net/manual/en/function.filesize.php#92462
Then do this to fetch the file: