Trap Incomplete Downloads

Is there any way to trap incomplete downloads from an apache web server? For instance, if a user cancels the download, or it otherwise errors out, is there any way that I can trap this?

This information IS stored in the access log, but I am looking for a way to trap this via a php or perl script for the purpose of gathering statistical information.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

if you still know the lines in the error_log, why not simply greping them with perl or php?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I agree with ahoffmann;  Apache already tracks this information in the access_log/error_log by putting in a error code for each page request - normally one would run a script against the log files in order to gather statistics.  What is gained by doubling the work?
syntaxmishapAuthor Commented:
ahoffmann, periwinkle -

The benefit to trapping this in real time would be the ability to respond to a cancelled download. An example would be prompting the user with information to assist them in re-downloading, or redirecting the user to a mirror.
Unfortunately, though, the world wide web is stateless.  Unless the user clicked on another page within your site, you have no way of knowing that the download didn't complete.
syntaxmishapAuthor Commented:
periwinkle -

Well, that is the idea; The files will be on the same server...

My best option is looking more and more like putting together a PHP script to serve up the files, which avails me the option of trapping the incomplete downloads that way. I was just trying to avoid that if possible, as putting together code to deal with download managers and still keep accurate statistics will require a bit more time in testing that I was looking to put in.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.