Detect Real User Agent (Original Code)

Started on the old forum in February 2012 · view the original in the archive · old links redirect here

29 replies · 3,924 views · started 14 years ago · 1 min read

TL;DR · summary of 29 replies
  • Detecting real user agent with the provided code is still unresolved as no fix or conclusion was reached.
  • The code has been updated multiple times, but issues related to detecting real user agents persist.
  • Users suggest improvements such as using arrays and loops for better performance and accuracy.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

14 participants
kiss Senior · 294 posts #21

something else wrote: hey kiss nice script you may want to think about using an array and using a for/while loop as 95% of your script is returning $match[0] so it would reduce the amount of hard coding and make it run faster

Hey friend, thank you for your opinion, i'll be glad if you post your idea by modify my script 🙂

www.inbuzunar.mobi -Your mobile portal pocket

something else Fellow · 2,296 posts #22

Something Else Edit

Heres a quick version to show you .... it might need a little work putting the odd matches like the opera one after the "for" loop 🙂

something else Fellow · 2,296 posts #24

i forgot to say i would probably also use:

return $_SERVER["HTTP_USER_AGENT"] ;

rather than return unknown 🙂

Vipin Newbie · 7 posts #25
return $_SERVER["HTTP_USER_AGENT"] ; 

This cant detect original user agent.

Anyone can easily change hi User Agent by downloading User Agent Switcher addon for Firefox 😛

metulj Super moderator Principal · 1,726 posts #26

Vipin wrote:

return $_SERVER["HTTP_USER_AGENT"] ; 

This cant detect original user agent.

Anyone can easily change hi User Agent by downloading User Agent Switcher addon for Firefox :P

i guess you dont understand this topic....

It's better to keep your mouth shut and give the impression that you're stupid, than to open it and remove all doubt. ⓣⓗⓔ ⓠⓤⓘⓔⓣⓔⓡ ⓨⓞⓤ ⓑⓔ©ⓞⓜⓔ, ⓣⓗⓔ ⓜⓞⓡⓔ ⓨⓞⓤ ⓐⓡⓔ ⓐⓑⓛⓔ ⓣⓞ ⓗⓔⓐⓡ ! ιη тнєσяу, тнє ρяα¢тι¢є ιѕ α яєѕυℓт σƒ тнє тнєσяу, вυт ιη ρяα¢тι¢є ιѕ тнє σρρσѕιтє.

キノgんイノ刀g 4 ア乇ムc乇 ノ丂 レノズ乇 キucズノ刀g 4 √ノ尺gノ刀ノイリ!

Matrix Junior · 12 posts #28

nice work most of times it is detecting original UA but some times it failed to detect original in my test anyway nice work 🙂

The King is Back...

Write your reply now; next you create a free account (or sign in) and it is posted right away. 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