# PHP Headers for Flash swf

**URL:** <https://forum.kirupa.com/t/php-headers-for-flash-swf/59391>\
**Category:** programming\
**Created:** [July 30, 2004, 8:59pm UTC](https://forum.kirupa.com/t/php-headers-for-flash-swf/59391 "2004-07-30T20:59:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yeldarb](https://avatars.discourse-cdn.com/v4/letter/y/51bf81/32.png) [@Yeldarb](https://forum.kirupa.com/u/Yeldarb)\
**Post date:** [July 30, 2004, 8:59pm UTC](https://forum.kirupa.com/t/php-headers-for-flash-swf/59391/1 "2004-07-30T20:59:35Z")

</div>

I’m trying to get some code to execute every time I call a file, so I want it to run through php. I can get this to work with an image like this:

```php

<?PHP
//The code I want to execute goes here
$file = "bike.jpg";
header("Content-type: image/jpeg");
include($file); 
?>

```

It works fine, but how would I do something like this where instead of having it output an image/jpeg it would be able to work with a flash movie? I tried switching the header to several different things, but I just get jumbled output in my browser when I go to the php page.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 30, 2004, 9:22pm UTC](https://forum.kirupa.com/t/php-headers-for-flash-swf/59391/2 "2004-07-30T21:22:56Z")

</div>

I got it, I had to use

```php

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

```

If anyone who’s searching later needs to do something like this 😉
