$HTTP_USER_AGENT problem. Help me!

Started on the old forum in May 2010 · view the original in the archive · old links redirect here

4 replies · 706 views · started 16 years ago · 1 min read

3 participants
Rocky01 Junior · 44 posts #1

$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

RafaelWBR Newbie · 7 posts #2

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;

extremely bored...

Rocky01 Junior · 44 posts #4

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

kevk3v Senior · 332 posts #5

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

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close