• home
  • Email: trainings@synapseindia.careers

Blogs

back

Detecting Visitor Browser Property

Oct 05, 2015

If we have to find what kind of browser visitor is using or vital information related to visitor then in that case we have to use superglobal variable $_SERVER['HTTP_USER_AGENT'].$_SERVER is a superglobal variable which contains all web server information.

Let us understand it through a program: <?php if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) { echo 'You are using Internet Explorer.<br />'; } ?>

SynapseIndia (CEO: Shamit Khemka)

Leave a Reply

Your email address will not be published.