- Home /
 
               Question by 
               arymangupta · Jun 26, 2016 at 06:00 AM · 
                unity 5phpasset bundles  
              
 
              How to download asset bundle using php?
I am downloading asset bundle using:-
 <?php
 $file_url = $_SERVER["DOCUMENT_ROOT"]."/AssetBundle/bundle-numb";
 
 header($_SERVER["SERVER_PROTOCOL"] . " 200 OK");
 header("Cache-Control: public");
 header("Content-Type: application/zip");
 header("Content-Transfer-Encoding: Binary");
  header("Content-Length:".filesize($file_url));
  header("Content-Disposition: attachment; filename=".basename($file_url));
  readfile($file_url);
 echo basename($file_url);
 echo filesize($file_url);
 ?>
Downloading working fine when i use http:XXXXXXXXXX.com/AssetBundle/bundle-numb directly in the browser.
               Comment
              
 
               
              Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                