Change User Agent in php.ini
<p>i am trying to change user agent in php.ini file as follows.</p>

<pre><code>user_agent="Mozilla/5.0 (iPhone Simulator; U; 
CPU iPhone OS 4_3_2 like Mac OD X; en-us) 
AppleWebKit/535.17.9(KHTML, like Gecko) 
Version/5.0.2 Mobile/8H7Safari/6533.18.5"
</code></pre>

<p>after that when i check user agent in my php file with following command and this show that user agent has not been change.</p>

<pre><code>echo $_SERVER['HTTP_USER_AGENT'];
</code></pre>

<p>this shows : <code>Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)</code></p>

<p>which is still not iphone user agent which i have set in php.ini file.</p>

<p>so please help me how to set user agent in php.ini file which switch my browser request as iphone browser request.</p>

<p>i have also tried with following command.</p>

<pre><code>ini_set('user_agent', 'Mozilla/5.0 (iPhone Simulator; U; 
    CPU iPhone OS 4_3_2 like Mac OD X; en-us) 
       AppleWebKit/535.17.9 (KHTML, like Gecko) Version/5.0.2 
       Mobile/8H7 Safari/6533.18.5');
</code></pre>

<p>this also gives same result and i am unable to switch to iphone browser request.</p>
