Jump to content

Recommended Posts

Hi,

I have some php code to detect if a browser has the flash plugin.

It works great in Fire Fox but in Internet Explorer 8(I haven't been able to test in other versions yet) it doesn't work on entry to my site, but if you hit refresh it suddenly works  :shrug:

 

Here's a link to my test site so you can see what I mean:

 

http://snow.byethost8.com/shop/

 

When you first go in, right click the main image and you'll see it's an image because you get the 'Save picture as' option.

Now hit refresh and do the same thing.....it's now flash!

 

Is there a better way to detect flash using php?

 

Here's the code I'm using:

<?php
// Search through the HTTP_ACCEPT header for the Flash Player mime-type.
$swfheader = strpos($_SERVER['HTTP_ACCEPT'],'application/x-shockwave-flash');
if($swfheader === false)
{
$hasFlash=true;
}
else
{
$hasFlash=false;
}
?>

Link to comment
https://forums.phpfreaks.com/topic/192858-detecting-flash-ie8/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.