![](/uploads/1/2/5/5/125525225/842826884.jpg)
I'm doing a script that increases the counter for an APK file's download then sends the file to the browser for download.
![Headertun apk ios Headertun apk ios](/uploads/1/2/5/5/125525225/827039800.png)
How to Play AnonyTun APK on PC,Laptop,Windows. 1.Download and Install Android Emulator on PC.Click “Download Emulator” to download. 2.Run Android Emulator on PC or Laptop. 3.Open Android Emulator for PC import the AnonyTun APK file from your PC Into Android Emulator to install it.
![Run Run](/uploads/1/2/5/5/125525225/948448704.png)
Here's what I have:
The problem is that with a browser like firefox, it downloads but it is like 'android.apk - 0 bytes'. So it essentially, it does not download the file's contents.
What might I be doing wrong? A solution for this?
IMPORTANT: It has to work on mobile.
);
William The Dev
William The DevWilliam The Dev3951 gold badge5 silver badges15 bronze badges
2 Answers
I've never accessed a .apk link that didn't force a download, so I'm not sure what the need for a force download is on that. As far as incrementing the counter, I would probably just link to a page that forwards to the apk file after the counter has been done.
For instance link someone to: getapk.php?apkid=1
Then on getapk.php do something like this:
Of course that leaves out a lot of details, but if you need help with anything else I'd be happy to provide more details.
SISYNSISYN1,4982 gold badges16 silver badges37 bronze badges
I've realized that I don't need to use complex header info expecially if the script will be moved from server to server where the .apk mime type is not native and may therefore be hard for a novice to set up.
A simple redirect will do:
Voila! I have increased the counter and the download will be pushed to the browser.
William The DevWilliam The Dev3951 gold badge5 silver badges15 bronze badges
Not the answer you're looking for? Browse other questions tagged phpandroidheaderdownloadapk or ask your own question.
![](/uploads/1/2/5/5/125525225/842826884.jpg)