PurgeHosting installs browscap.ini – Browser Detection in PHP

All PurgeHosting Servers now have the browscap.ini file installed and configured with PHP. This allows you to use the get_browser function in php on your websites. Using this tool, you can detect a users browser, easily using PHP.

Without this installed on our servers, you would see the following error:

Browscap ini Directive Not Set

Here’s an example of some code you can use now that our servers are configured to allow it:

<?php

	$browser = get_browser();
	if($browser->browser == 'IE' ) {
		echo "You are using Internet Explorer! Time to Upgrade!";
	} else {
		echo "Oh good, you are not using IE";
	}
?>

Happy Coding.

This entry was posted in PurgeHosting. Bookmark the permalink.

3 Responses to PurgeHosting installs browscap.ini – Browser Detection in PHP

  1. Pingback: Topics about Microsoft ยป PurgeHosting installs browscap.ini - Browser Detection in PHP

  2. Utistumb says:

    well.. it’s like I said!

  3. Utistumb says:

    now I’ll stay tuned..