$HTTP_USER_AGENT showing full information of the device, but I want to show only the device name. (e.g. Opera, SonyEricsson C510, N97,..etc). Plz help me Here is my site http://wap49.co.cc
@n@l
Started on the old forum in May 2010 · view the original in the archive · old links redirect here
$HTTP_USER_AGENT showing full information of the device, but I want to show only the device name. (e.g. Opera, SonyEricsson C510, N97,..etc). Plz help me Here is my site http://wap49.co.cc
@n@l
<?php echo $_SERVER["HTTP_USER_AGENT"]; ?>
Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com
RafaelWBR wrote: Here is an exemple:
$ MY_USER_AGENT = explode("/", $_SERVER["HTTP_USER_AGENT"]); $ MY_USER_AGENT = $ MY_USER_AGENT[0]; // Now lets show the result echo $MY_USER_AGENT;
Thanx bro its working. Thanx again
@n@l
Crap sorry you wanted the name only? for the name only use
<?php $name = explode("/",$_SERVER["HTTP_USER_AGENT"]); echo $name[0]; ?>
Mobile chat, iphone chat, android chat, chat, rooms http://www.aiochat.com