preciso alterar o user agent no mobile. Tentei com php puro mas não deu certo, estou utilizando o Mobile Detect, até consigo detectar quando é mobile, mas não consigo alterar o user agent.
O exemplo que segui foi este
if(!$detect->isMobile()) {
$userAgent = 'BlackBerry7100i/4.1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/103';
$detect->setUserAgent($userAgent);
echo $_SERVER['HTTP_USER_AGENT'] . "<hr />\n";
}
O que está errado?