Link to home
Start Free TrialLog in
Avatar of syntaxmishap
syntaxmishap

asked on

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.

ASKER CERTIFIED SOLUTION
Avatar of ahoffmann
ahoffmann
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of periwinkle
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?
Avatar of syntaxmishap
syntaxmishap

ASKER

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.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.