Download File
Moderator: General Moderators
Download File
Is it possible to have a user download a file onto their computer, then when when the download has completed update a database? I know how to update the database, but how can I do the rest? Thanks
- akimm
- Forum Contributor
- Posts: 460
- Joined: Thu Apr 27, 2006 10:50 am
- Location: Ypsilanti Michigan, formally Clipsburgh
Consider using
Javascript or Html to mitigate the download. I'm sure php has a way but I'm way too new to demonstrate that for you.
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
I tried using header() but I am getting this Error
Are there any workarounds? Thanks
Code: Select all
Warning: Cannot modify header information - headers already sent by (output started at /home/folder1/folder2/page.php:35) in /home/folder1/folder2/page.php on line 40- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Read on: viewtopic.php?t=1157
Thanks for that, I didn't need that echo anyway, but now it's giving me an error that says I am unauthorized to view that page. I do have hotlink protection enabled, but I have accesses set up for my domain and it's not giving me errors on any of the other file types, just this one. And this is the only one I access with php. Any suggestions?
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
I had an echo "blablabla"; at the top of my page which screwed up the header(). Hotlink protection disalowes people from accesing files on my server. When I say other file types I mean the hotlink protection is only set up for certain file extensions (jpg,bmp,mxp,ect...) and they all seemed to be working, but none of the other types are called by php.
I did find a fix for this however. I found this post on php.net:
http://us3.php.net/manual/en/function.header.php#65667
Thanks for all your help.
I did find a fix for this however. I found this post on php.net:
http://us3.php.net/manual/en/function.header.php#65667
Thanks for all your help.