Title: Flash header/detect/redirect
Last modified: August 19, 2016

---

# Flash header/detect/redirect

 *  Resolved [pbwordp](https://wordpress.org/support/users/pbwordp/)
 * (@pbwordp)
 * [17 years ago](https://wordpress.org/support/topic/flash-headerdetectredirect/)
 * Hello there, I have a Flash animation on the “header” of my blog and need some
   help with the following issues.
 *  *I need a script to detect the flash player. If player is not available, then
   to redirect and open a .jpg file on the “header” instead. The script can’t redirect
   to a new page only to load on the “header” a different format file in the player’s
   absence.
 * Thanks!!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [adamt07](https://wordpress.org/support/users/adamt07/)
 * (@adamt07)
 * [17 years ago](https://wordpress.org/support/topic/flash-headerdetectredirect/#post-1094663)
 * are you wanting to use php to detect the player? I just read this on php flash
   detection:
 * <?php
    if(eregi(“application/x-shockwave-flash”, $_SERVER[‘HTTP_ACCEPT’])) { 
   PRINT_FLASH_CONTENT } else { PRINT_IMAGE_FILE } ?>
 * I took the comments out but you can find that (almost) exact same snippet at 
   [http://www.sitepoint.com/article/techniques-unearthed/5/](http://www.sitepoint.com/article/techniques-unearthed/5/)
 * As far as using javascript you’d just have to search for it a little bit. I’m
   not that great with javascript :/
 *  Thread Starter [pbwordp](https://wordpress.org/support/users/pbwordp/)
 * (@pbwordp)
 * [17 years ago](https://wordpress.org/support/topic/flash-headerdetectredirect/#post-1094757)
 * There seems to be a conflict with the code because nothing loads in the browser,
   not even the post. Is there something in the code I’m not writing properly?
 * here is what I have:
 * <?php
     if(eregi(“application/x-shockwave-flash”, $_SERVER[‘HTTP_ACCEPT’]))  {
   <object classid=”….. This is the flash object etc… } else { <img src=”my_folder/
   my_image.jpg”>…. this is the image path. ?>
 *  [adamt07](https://wordpress.org/support/users/adamt07/)
 * (@adamt07)
 * [17 years ago](https://wordpress.org/support/topic/flash-headerdetectredirect/#post-1094767)
 * You need to close the php tags and reopen them, like:
 * <?php
     if(eregi(“application/x-shockwave-flash”, $_SERVER[‘HTTP_ACCEPT’]))  {?
   >
 * <object classid=”….. This is the flash object etc…
 * <?php } else { ?>
 * <img src=”my_folder/my_image.jpg”>…. this is the image path.
 * <?php } ?>
 *  Thread Starter [pbwordp](https://wordpress.org/support/users/pbwordp/)
 * (@pbwordp)
 * [17 years ago](https://wordpress.org/support/topic/flash-headerdetectredirect/#post-1094778)
 * Thanks Adam, but I can’t get the code to work, it just opens the .jpg image straight
   forward, ignoring the flash object.
 * Any thought on why is bypassing the first lines?
 *  [adamt07](https://wordpress.org/support/users/adamt07/)
 * (@adamt07)
 * [17 years ago](https://wordpress.org/support/topic/flash-headerdetectredirect/#post-1094809)
 * ok I tested the $_SERVER[‘HTTP_ACCEPT’] part and apparently that doesn’t always
   read like I thought/understood it to. I’ve read all over the net that php flash
   detection is pretty much impossible, although I’m sure there’s got to be some
   way to do it. That being said, I found a group of files on the Adobe website 
   that use javascript to detect if flash is there and if not, display an image.
   They also work so that if javascript is disabled, it assumes no flash and display
   the image. The files can be found at [http://kb2.adobe.com/cps/141/tn_14147.html](http://kb2.adobe.com/cps/141/tn_14147.html).
   All you need to do is plug in the image info and the movie info. I tested these
   files and they seem to work great in firefox (only browser I tested).

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Flash header/detect/redirect’ is closed to new replies.

 * 5 replies
 * 2 participants
 * Last reply from: [adamt07](https://wordpress.org/support/users/adamt07/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/flash-headerdetectredirect/#post-1094809)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
