You are here: download « PHP Programming Language « IT news, forums, messages
download

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация