Jump to content

php script to detect flash


westman

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?

Link to comment
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

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...