Android Question Download SQLite files using PHP

LucaMs

Expert
Licensed User
Longtime User
I searched everywhere (mostly on StackOverflow) without success.

Is there a way to download SQLite files using PHP from a classic free hosting space (Altervista, in my case)?


[I cannot use FTP because there is no way to protect files to be deleted]


Thank you
 

sorex

Expert
Licensed User
Longtime User
I don't see why it shouldn't work.

worst case you need to zip it as it might block the extention or because it has no extention at all.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
you'll need to force a binary header to make sure it doesn't corrupt.

B4X:
header('Content-Transfer-Encoding: binary');
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
it should set it automatically. maybe you need an additional content type to make it work right.
 
Upvote 0

sorex

Expert
Licensed User
Longtime User
by the way... if you store the file first on your server you can just use the header function to redirect to the url of the file which downloads the file without the misery of setting the right headers.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Now I can download a correct SQLite file; but why?

Now I moved the script file to the same folder where the file to download is.

But before, having that file (modified) in a different folder, the script found the file anyway, it was downloaded but it was corrupt!

I don't know :confused:

Now I have to create a b4a client; will I have other problems? SURE :p


Thank you.
 
Upvote 0
Top