Here is my code:
<?PHP
$details1=json_decode(file_get_contents("http://2strok.com/download/download.json"));
$details2=json_decode(file_get_contents($details1->data));
echo "{$details2->data}";
?>
I do found some php code there i can force file to download but, i want to connect it with the result of download.json to be forced downloading.
Forece downloading example:
$file_url = 'http://www.test.com/forece-file.mp3';
header('Content-Type: application/octet-stream');
header("Content-Transfer-Encoding: Binary");
header("Content-disposition: attachment; filename=\"" .
basename($file_url) . "\"");
readfile($file_url);