Click to See Complete Forum and Search --> : Flash PHP
davidbrent
05-22-2004, 08:54 AM
Hello all.
I was wondering whether there was a specific way or script to detect whether the user has flash player installed. If not then the flash navigation changes to a predesigned html/css one.
If the user has flash then they see the flash navigation. If the user doesn't have flash, it echos(?) out a css and html nabia where the flash file was embedded.
Best Wishes,
David
96turnerri
05-22-2004, 09:09 AM
there is a way to detect a users flash capability, if you notice on big flash applets it says detecting flash i think it is done through flash actionscript so i would recommend googling it google.com (www.google.com)
davidbrent
05-22-2004, 09:16 AM
thanks for your reply. I found this script on google:
<SCRIPT LANGUAGE=JavaScript1.1>
<!--
var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words[i])))
continue;
var MM_PluginVersion = words[i];
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.appVersion.indexOf("Win") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
window.location.replace("http://www.kirupa.com/flash.htm");
} else{
window.location.replace("http://www.kirupa.com/noflash.htm");
}
//-->
</script>
you see the problem, as its JavaScript. Its not 100% accessible.
Does anybody know of a way using PHP? Read my original question for what i am asking.
Best Wishes,
David
96turnerri
05-22-2004, 09:38 AM
i may be wrong but i think you will find flash is a client side 'language' as is javascript as opposed to php, so it may not be possible
MstrBob
05-22-2004, 10:53 AM
Originally posted by 96turnerri
i may be wrong but i think you will find flash is a client side 'language' as is javascript as opposed to php, so it may not be possible
True, but PHP's get_browser() function can detect JavaScript and Java on a user's browser, along with a lot of their browser information. However, I do not think that it can detect Flash.