|
Posted by Thorsten Kiefer on 07/12/07 09:17
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);
?>
Can anyone correct this please ??
Thank you all very much !!
Thorsten
Navigation:
[Reply to this message]
|