Re: PHP mail function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi 

Where are you from Mark ? I am an Indian and I admire many of them from US and German . he he he and you are admiring US. 

Anyway thats cool . 

But I don't get your question . Are you looking to download a file ?

There are lots of scripts in the header mannual of php . Try to explore it .. I have taken a sample code for you .

<?php

header("Content-Disposition: attachment; filename=" . urlencode($file));    

header("Content-Type: application/force-download");

header("Content-Type: application/octet-stream");

header("Content-Type: application/download");

header("Content-Description: File Transfer");             

header("Content-Length: " . filesize($file));

flush(); // this doesn't really matter.



$fp = fopen($file, "r"); 

while (!feof($fp))

{

    echo fread($fp, 65536); 

    flush(); // this is essential for large downloads

}  

fclose($fp); 

?>

http://in3.php.net/manual/en/function.header.php

I hope you are asking about the same . If not let me know or some one else may help you .

Thanks

Hari K T

http://harikt.com/


--- On Tue, 25/8/09, mark joseph Diose <mjdiose@xxxxxxxxx> wrote:

From: mark joseph Diose <mjdiose@xxxxxxxxx>
Subject: Re:  PHP mail function
To: php-objects@xxxxxxxxxxxxxxx
Date: Tuesday, 25 August, 2009, 8:57 AM






 




    
                  hello guys,



im figuring out how to download a file using a url only of the file ..

is it possible that PHP can do such task if ever it can.. please tell how..

i will appreciate it very much..



Im reall looking forward to you guys that you can help me..

especially to indian coders that i really admired..



thanks...



PM me pls for the answer..


 

      

    
    
	
	 
	
	








	


	
	


      See the Web&#39;s breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux