[php] flash header probleempje

Pagina: 1
Acties:

  • chuxiej
  • Registratie: Februari 2001
  • Laatst online: 13-07-2020
Ik heb een database met plaatjes en ook flash.

Nu wil ik niet dat een plaatje word geopen:
www.domein.com/plaatje.gif

maar via www.domein.com/image.php?ID=235532

Dat is nu gelukt en werk perfect via
PHP:
1
<?header("Content-type: image/png"); $image = ImageCreateFromPNG("$image");// cut?>

maar nu wil ik dit doen met flash bestandjes:
PHP:
1
<?case 'application/x-shockwave-flash'; header("Content-type: application/x-shockwave-flash");  $fn=fopen($image,"r"); fpassthru($fn);break;?>

Nu werkt het als ik de file nu via een andere html pagina aanroep:
code:
1
<embed src="http://www.domein.com/image.php?ID=558182338">

Maar hoe krijg ik nou dat ik gewoon de flash kan zien ipv een paar paginas vol vreemde tekens zoals: ÞiºÜ>QÂ:V±}®é±ê©l³êw

www.dannyhiemstra.nl


  • T.T.
  • Registratie: April 2000
  • Laatst online: 22-01 14:13

T.T.

Sowieso

Ik heb het nog nooit gebruikt, maar misschien heb je

http://www.php.net/manual/en/function.swf-openfile.php

nodig :)
If you choose to output the Flash file directly to the browser, you can do so by setting the header content type with:

header("Content-type: application/x-shockwave-flash")

and changing swf_openfile("filename", ...) to swf_openfile("php://stdout", ...)