Can someone please tell me how on earth I can change the the browser info to, example Opera or Nokia or Samsung and not the configuration. Only the browser type. External image (may be gone)
Browser Info
Started on the old forum in July 2006 · view the original in the archive · old links redirect here
TL;DR · summary of 23 replies
- -Mike-- asked for a way to change browser information, like replacing "Opera 9.0 / (Windows NT)" with just "Opera".
- --Mike-- wanted this applied to different browsers and devices, such as Samsung D500.
- CLINT provided a code snippet that worked: [code] $browser = $_SERVER['HTTP_USER_AGENT']; echo 'Browser: ' . $browser; [/code]
- Guest suggested using the full browser name with OS details for more accuracy.
Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.
like to replace Opera 9.0 / (Windows Nt) bla bla with just Opera ?? External image (may be gone)
here you go mate...External image (may be gone)
Try the clints one.
Mine is too long.
You can edit it as you wish to suite your preferences.External image (may be gone)
lol, some people really do go round the houses!! Try this
$browser = explode ('/', $HTTP_USER_AGENT); echo $browser[0];This will give you the result you want. (and how much neater is this one, lol)
LMAO Allready gave Mike the code and its working! External image (may be gone)k:
Ha ha.... i really didnt know dat mate...i took a long cut... Mike ... try the clints one instead of mine.... External image (may be gone)
Can someone please tell me how on earth I can change the the browser info to, example Opera or Nokia or Samsung and not the configuration. Only the browser type. External image (may be gone)
hi mike how r u
hi mike how r u
where u form plz
here bro...........
displays eg opera 8.54/
print 'Browser:'; $browser = explode ('/', $HTTP_USER_AGENT); print $browser[0]; print ' '; print "IP: $REMOTE_ADDR \n";displays eg only opera
echo " Browser: "; echo "$HTTP_USER_AGENT "; echo "Ip: "; echo "$REMOTE_ADDR";
hi mike how r u where u form plz
hi every body how r u , u are wel come
here is my code which i use
print 'Your Info:';
$browser = $_SERVER['HTTP_USER_AGENT'];
print '
'; print "IP: $REMOTE_ADDR \n"; echo "Browser: $browser";
even i prefer $browser = $_SERVER['HTTP_USER_AGENT']; External image (may be gone)