I have php script on my server which forces a download when a correct key is given. I want to download the file which that script forces to download, not the script itself, using java. I see questions which answer how to download a file which is located at a certain url, but not how to download a file forced through a script. Also would it be possible to route the download through a certain path instead of having it go to the downloads folder of the computer, or wherever it would automatically go? Here's my relevant php script:
header("Content-type: application/force-download");
header("Content-Disposition: attachment; filename=\"" . str_replace(" ", "_", $arrRES['file']) . "\"");
echo $strFile;
and the java would be something like :
URL url= new URL("http://supremesharkbot.com:8080/update/?key="+activationkey);
but then i don't know where to go from there. Thanks