astrojunky Posted July 10, 2009 Share Posted July 10, 2009 Hello beautiful people, is it possible to know whethere a file has been downloaded successfully by the user? Does it have something to do with flush()? I guess it's possible with Ajax, but I don't have a clue which are the php functions to be used. Thanking you in advance. astro Quote Link to comment https://forums.phpfreaks.com/topic/165477-how-to-know-whether-a-file-has-been-downloaded-successfully-on-the-client-side/ Share on other sites More sharing options...
JonnoTheDev Posted July 10, 2009 Share Posted July 10, 2009 This is not possible. You can detect a download action but not if the download completes. Quote Link to comment https://forums.phpfreaks.com/topic/165477-how-to-know-whether-a-file-has-been-downloaded-successfully-on-the-client-side/#findComment-872773 Share on other sites More sharing options...
astrojunky Posted July 10, 2009 Author Share Posted July 10, 2009 Thank you for the quick reply Neil. It isn't possible not even with Ajax? Maybe it's possible to get the download feedback on the client side, i.e by using javascript.. Quote Link to comment https://forums.phpfreaks.com/topic/165477-how-to-know-whether-a-file-has-been-downloaded-successfully-on-the-client-side/#findComment-872786 Share on other sites More sharing options...
JonnoTheDev Posted July 10, 2009 Share Posted July 10, 2009 It isn't possible not even with Ajax Ajax makes requests to server side scripts (ajax is javascript, not a language in itself). A server script has nothing to do with the download process. This is done via the users operating system. Aslo javascript will not help as it is parsed by a web browser. I have never heard of websites that perform actions after a download has completed (as it's impossible). Quote Link to comment https://forums.phpfreaks.com/topic/165477-how-to-know-whether-a-file-has-been-downloaded-successfully-on-the-client-side/#findComment-872790 Share on other sites More sharing options...
astrojunky Posted July 10, 2009 Author Share Posted July 10, 2009 hmm, ok. Thank you very much for your info. Quote Link to comment https://forums.phpfreaks.com/topic/165477-how-to-know-whether-a-file-has-been-downloaded-successfully-on-the-client-side/#findComment-872801 Share on other sites More sharing options...
aschk Posted July 10, 2009 Share Posted July 10, 2009 Actually i believe it is possible, and it requires 2 things. 1) You detect a call to premature halt of your script 2) You detect byte count of delivered files. I messed around with something along these lines quite a while ago, but don't recall if i ever got it working. Quote Link to comment https://forums.phpfreaks.com/topic/165477-how-to-know-whether-a-file-has-been-downloaded-successfully-on-the-client-side/#findComment-872802 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.