We are trying to force download an .apk file when users reach our website using the below script
$path = "../../".$_GET['file'];
header("Content-Description: File Transfer");
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=".$_GET['file'] );
@readfile($path);
Whenever we reach the site and download starts, the following error of "This file can harm your device pops out" in android chrome only. But the same file, when we try to download it by typing in url address bar, it downloads without any warning message.
Any solutions to this. Thanks in advance.