: How to download an MP3 or ZIP file onto mobile devices I want to be able to download digital goods to smartphone users (music in format .mp3 or .zip). But iPhone and iPad do not allow direct
I want to be able to download digital goods to smartphone users (music in format .mp3 or .zip). But iPhone and iPad do not allow direct forced downloads.
How can I provide mobile users with digital downloads? I use PHP.
The only way I can think of to do this is to use the Dropbox Web API to transfer files to the user's Dropbox account, which then synchronizes with their mobile device.
Any other suggestions would be appreciated.
More posts by @Sarah324
3 Comments
Sorted by latest first Latest Oldest Best
I'm not sure exactly what you need, but it is possible to have a mobile platform (iOS, Android, etc) download a file. With some minor quirks, mobile browsers behave just like their desktop counterparts.
You can provide the user with a direct link like example.com/somefile.zip
If you need to do some processing via PHP first, it can look like
<?php
// can I download this file
if ( $itsoktodownload == true ) {
// some code here
header("Location: example.com/somefile.zip); exit;
}
?>
Basically, that code snippet is just redirecting the user to the url of the downloaded file.
If you need something more specific, like you need to force it to download (instead of attempting to "open"), or you need to control the headers sent first, or you are trying to hide the real location of the file (so people can't share the link around), there are many download scripts available via google.
You could ask a more specific question once you've gotten into it a bit.
iDownloads PLUS is great iOS application which helps to download mp3 and Zip files. It also includes many advanced features for zip extract, music playlist and many others additional work.
You can use any of:
A custom application (although, at least on iOS, you won't be able to add mp3s to the main music library on the device)
The official stores (iTunes / Google Play / 3rd Party Android Stores)
A download the user can access on their desktop and then sync to their mobile device
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.