|
Posted by Thorsten Kiefer on 07/12/07 12:40
Floortje wrote:
> Thorsten Kiefer wrote:
>> Hi,
>> I want to offer the user a file for download.
>> For images I do this :
>>
>> <?php
>> header ("Content-type: image/png");
>> $im = imagecreatetruecolor(50, 25);
>> $text_color = imagecolorallocate($im, 233, 14, 91);
>> imagestring($im, 5, 5, 5, "bla", $text_color);
>>
>> imagepng($im);
>> imagedestroy($im);
>> ?>
>>
>> Now I'm wondering, what imagepng() exactly does ?!
>> Because I want to offer an executable.
>> My first idea was something like this :
>>
>> <?php
>> header ("Content-type: application/executable");
>> $x = file_get_contents("myexe");
>> header($x);
>> ?>\
>
> http://nl2.php.net/readfile
>
> Arjen
Thanks !!
[Back to original message]
|