File download problem |
[eluser]Unknown[/eluser]
In my application, a person can by an ebook, when payment is completed a link to the file is send in email. By clicking on it an a function in controller is called which after validating a security code, renders view with the link to the file to download. By clicking on this link an other function is called which starts a download, I am using the php readfile method. the code for it is following, header("Content-type: application/force-download"); header("Content-Transfer-Encoding: Binary"); header("Content-disposition: attachment; filename=\"".basename($file)."\""); readfile("$file"); After this we have code that updates the database. Now my problem is that I want to run this code after the file is completely downloaded. Can anyone help me with this.
[eluser]LuckyFella73[/eluser]
hi, I have no solution for you but found a link to a post where this problem was discussed. They didn't come toa final solution but maybe you get some hints ... http://bytes.com/groups/php/606924-check...downloaded |
Welcome Guest, Not a member yet? Register Sign In |