Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<h3>Can I Imitate Another Browser/Platform?</h3> <p>There are many ways to spoof user agent strings. In firefox, there happens to be an extension called "User Agent Switcher," which allows you to imitate other browsers.</p> <p><a href="https://addons.mozilla.org/en-US/firefox/addon/59" rel="nofollow noreferrer">https://addons.mozilla.org/en-US/firefox/addon/59</a></p> <h3>User Agents</h3> <p>Checking the user-agent often times can tell you this. For instance, my user-agent is:</p> <blockquote> <p>Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.38 Safari/532.0</p> </blockquote> <p>Which platform am I on?</p> <h3>Javascript Option</h3> <p>You can also use the <code>navigator</code> object in Javascript to get some information too. For instance:</p> <pre><code>alert(navigator.platform); // alerts Win32 alert(navigator.userAgent); // Mozilla/5.0 (Windows; U; Windows NT 6.0... </code></pre> <h3>PHP Options</h3> <p>You can get the user-agent in PHP from the $_SERVER array:</p> <pre><code>print $_SERVER["HTTP_USER_AGENT"]; // Mozilla/5.0 (Windows; U; Windows NT... </code></pre> <p>PHP also has further goodies, such as the <a href="http://php.net/manual/en/function.get-browser.php" rel="nofollow noreferrer"><code>get_browser()</code></a><strong>*</strong> function in PHP which returns an array of information, including the <code>platform</code>:</p> <pre><code>Array ( ... [parent] =&gt; Firefox 0.9 [platform] =&gt; WinXP [browser] =&gt; Firefox [version] =&gt; 0.9 ... ) </code></pre> <hr> <p><sup>* <code>get_browser()</code> relies upon browscap.ini - See<br/> <a href="http://www.php.net/manual/en/misc.configuration.php#ini.browscap" rel="nofollow noreferrer">http://www.php.net...php#ini.browscap</a> for more information.</sup></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload