note 125480 deleted from tutorial.useful by cmb
| From: | cmb@php.net | Date: | Sun, 01 Nov 2020 13:51:33 +0000 |
| Subject: | note 125480 deleted from tutorial.useful by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-215681@lists.php.net to get a copy of this message | ||
Note Submitter: Md Moniruzzaman Natore
----
<?php
echo $_SERVER['HTTP_USER_AGENT'];
?>
Output of Google Chrome:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/86.0.4240.111 Safari/537.36
Output of Microsoft Edge:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/70.0.3538.102 Safari/537.36 Edge/18.18362
The USER AGENT string is a text that the browsers themselves send to the webserver to identify
themselves, so that websites can send different content based on the browser or based on browser
compatibility.
Mozilla is a browser rendering engine (the one at the core of Firefox) and the fact that Chrome and
IE contain the string Mozilla/5.0 identifies them as being compatible with that rendering engine.