Tips and Tricks
| From: | Adriano de la Cruz | Date: | Thu, 05 Apr 2001 03:03:12 +0000 |
| Subject: | Tips and Tricks | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-4655@lists.php.net to get a copy of this message | ||
I've seen some tips on determining what browser the client is using (i.e.
parsing the HTTP_USER_AGENT), but I would like to see some information on
determining the capabilities available to the browser using PHP.
Specifically, whether the client browser has javascript enabled or disabled,
and what plug-ins are installed on the browser (such as Flash, Adobe Acrobat
Reader, RealPlayer, etc.).
This would allow me to customize the HTML sent to the client. The only
alternative, which doesn't use PHP and I haven't tested, would be somthing
like:
<SCRIPT LANGUAGE="javascript">
function popup(url) {
POPUPwindow = window.open(url, "popup",
"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,r
esizable=no,width=440,height=225,left=10,right=10");
POPUPwindow.focus();
}
print "<A HREF=javascript.popup(new_url)>popup_window</A>\n";
</SCRIPT>
<NOSCRIPT>
<A HREF=new_url>popup_window</A>
</NOSCRIPT>
Thanks in advance
Adriano de la Cruz
adriano@pogocorp.com