Jump to content
Sign in to follow this  
westman

php script to detect flash

Recommended Posts

hi all,am looking for the best way to detect flash on all devices (pc, tablet, phone etc.) for a menuthis is what i have so fear... <?if (strstr($_SERVER['HTTP_ACCEPT'], 'application/x-shockwave-flash')){$hasFlash = true;}if ($hasFlash == "true"){// flash menu} else {// html menu};?> is this the best way? or is there better ways?

Share this post


Link to post
Share on other sites

You need to use Javascript to detect Flash, not PHP. The brower does not send Flash mime types in the list of types to accept, at least not that I see.

Share this post


Link to post
Share on other sites

remember that PHP is a server side language, and has fairly limited interaction with the browser. For a client side/browser based feature/plugin like Flash, you would need to do the detection with JS as JSG mentioned.http://stackoverflow.com/questions/159261/cross-browser-flash-detection-in-javascript

Share this post


Link to post
Share on other sites

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.   Paste as plain text instead

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...