Downloading files to Android default browser using PHP fails to recognise MIME type

I have a web site used by around 200 users one of whose functions is to download documents on request.

The download works fine on a PC but on an Android device using the default browser it fails to recognise the file type, with the result that the user can't read the file.   On the same device the Chrome browser works fine.

I'm using the download code from webinfopeadia (attached).
Who is Participating?
DavidRMasonAuthor Commented:
Thanks for the suggestions.

Having done some research I came across this article:

My initial attempts to resolve using the ideas in this article hadn't worked so I posted the above on Experts Exchange to see if the experts had some better ideas.

However while awaiting a response I came back to the above article and if you read in depth you will see that there are problems with downloading if it is in response to a "POST" request.    

I have done a test using the "GET" method and it works fine.

Thanks for your help
RobOwner (Aidellio)Commented:
Have you got a link to your site that I can test?

What is the mime type that's failing?
Your code does not handle office 2007 documents.
mime.types of apache is better place for file types vs mime
RobOwner (Aidellio)Commented:
No problem.  go ahead and mark your comment as the solution :)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.