RE: [PHP] Check browser for flash plug-in ?
| From: | Marc Koschewski | Date: | Fri, 29 Sep 2000 17:31:45 +0000 |
| Subject: | RE: [PHP] Check browser for flash plug-in ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-18085@lists.php.net to get a copy of this message | ||
> Javascript can do this, but only with Netscape by checking the
> navigator.plugins[] array.
> Microsoft does not support the plugins array (well, it does, but it
> will always return 0 regardless).
>
> -----Original Message-----
> From: Daniel Joly [mailto:danyj@videotron.ca]
> Sent: Friday, September 29, 2000 12:15 PM
> To: php-general@lists.php.net
> Subject: [PHP] Check browser for flash plug-in ?
>
>
>
> --
>
> Hi everybody.
>
> I do some research but unable to find if there is a function in PHP to
> check if the browser have flash plug-in. I use Php 3
>
> Thank you so much
> It's really appreciate it
>
> Daniel
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
Here's what you're looking for ...
=== CUT HERE ===
<script language="JavaScript" type="text/javascript">
var bname = navigator.appName.substring(0,8)
var bver = parseFloat(navigator.appVersion)
var isIE = ((bname == "Microsof") && (bver>= 4))
var isNC = ((bname == "Netscape") && (bver>= 4))
// if(isNC || isIE) document.writeln("<p>Browser OK</p>.")
var havePlugIn = false
if(isIE)
{
var testfenster = window.open("", "testen",
"width=1,height=1")
if (testfenster != null)
{
if (testfenster.document.open("application/x-director") !=
null)
havePlugIn = true
testfenster.close()
}
}
else
{
if(isNC)
{
if(navigator.mimeTypes &&
navigator.mimeTypes["application/x-shockwave-flash"] &&
navigator.mimeTypes["application/x-shockwave-
flash"].enabledPlugin)
{
if (navigator.plugins && navigator.plugins["Shockwave
Flash"])
havePlugIn = true
}
}
else
{
document.writeln("<p>Not Netscape or IE!<br>Maybe
problems viewing this site.")
}
}
if(!havePlugIn)
top.location.href = 'noflash.html';
</script>
=== CUT HERE ===
Mit freundlichen Gruessen,
marc koschewski
softwareentwicklung
freund & co. gmbh
mollenkotten 195
42279 wuppertal
fon: +49 2 02 / 2 62 78 - 0
fax: +49 2 02 / 2 62 78 - 20
eMail: m.koschewski@freund-co.com
www: http://www.freund-co.com/