I made a few changes as shown below and the download worked in IE (and Chrome):
1. In returnMIMEType on line 21 you used $fileSuffix[1]. That is not defined. I changed that to $ext.
2. In getDownLoadData, on line 15 I changed header("Pragma: public"); to header("Pragma: no-cache");
3. In getDownLoadData, I deleted line 23 because it isn't needed and it isn't being given the right data and makes the downloaded file unusable.
When I checked, I found that the file I was able to download previously was not actually usable.
It is important and a lot less frustrating if you know how to debug these things for yourself. A few well placed echo's (or some actual debug function calls if you want to get a bit fancier) will tell you if you are getting the data that you expected. For the mime-type, it would have worked for most types but I happened to use a .png file and the code for that wasn't quite right. I did a separate call to the returnMIMEType function (before all the headers) and echo'd what came back. When I saw that I was getting 'image/' with no type I went and looked closer at the code and found the problem. In this case, I could have just looked at the code but if it was more complicated, using a bit of debug code will probably save time. For the header statements, I used a program of my own as …