php - For zip files: This file is not commonly downloaded. in firefox
Get the solution ↓↓↓So since I was making a website for the first time, I registered a new domain name with the extension ".ml"(example something.ml) since I get it for free. Now, I hosted this domain on a well know server provider and I have an HTML code which makes user download a zip file containing some png images when clicked on a button. When I download the zip file on chrome, it works fine. But on Firefox, it says "This file is not commonly downloaded." I checked some websites and links [link] which says this can be since firefox maintains some list of websites and probably my website might not be in that list. Is this correctly understood by me? Also, should I expect the problem to be solved once I buy some domain with extension ".com"?
The code I used for sending the zip file was
$zip = new ZipArchive();
$zip->open("$zipcreated");
$sendfolder = "$zipcreated";
header('Content-type: application/zip');
header('Content-Description: File Transfer');
header("Content-Disposition: attachment; filename=$sendfolder");
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
$size = filesize($sendfolder);
header('Content-Length: ' . filesize("$sendfolder"));
ob_clean();
readfile($sendfolder);
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: malformed utf-8 characters, possibly incorrectly encoded
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.