Forums / WEB Scripts
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.
Sort replies:
Oldest
Top voted
Newest
KI
kiss
Senior · 294 posts
14 years ago
#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 🙂
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 🙂
KI
kiss
Senior · 294 posts
14 years ago
#23
i forgot to say i would probably also use:
return $_SERVER["HTTP_USER_AGENT"] ;
rather than return unknown 🙂
VI
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 😛
ME
metulj
Super moderator Principal · 1,726 posts
14 years ago
#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ノ刀ノイリ!
KI
kiss
Senior · 294 posts
14 years ago
#27
MA
nice work
most of times it is detecting original UA but some times it failed to detect original
in my test
anyway nice work 🙂
KI
kiss
Senior · 294 posts
14 years ago
#29
KI
kiss
Senior · 294 posts
14 years ago
#30
New update it available 8)