westman Posted December 31, 2012 Share Posted December 31, 2012 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 More sharing options...
justsomeguy Posted January 7, 2013 Share Posted January 7, 2013 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. Link to comment Share on other sites More sharing options...
thescientist Posted January 7, 2013 Share Posted January 7, 2013 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now