You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+23-1
Original file line number
Diff line number
Diff line change
@@ -44,9 +44,12 @@ This solution identifies the following Browsers and does a best-guess on the ver
44
44
* Firefox (`Browser::BROWSER_FIREFOX`)
45
45
* Mozilla (`Browser::BROWSER_MOZILLA`)
46
46
* Palemoon (`Browser::BROWSER_PALEMOON`)
47
+
* curl (`Browser::BROWSER_CURL`)
48
+
* wget (`Browser::BROWSER_WGET`)
47
49
* Amaya (`Browser::BROWSER_AMAYA`)
48
50
* Lynx (`Browser::BROWSER_LYNX`)
49
51
* Safari (`Browser::BROWSER_SAFARI`)
52
+
* Playstation (`Browser::BROWSER_PLAYSTATION`)
50
53
* iPhone (`Browser::BROWSER_IPHONE`)
51
54
* iPod (`Browser::BROWSER_IPOD`)
52
55
* Google.s Android(`Browser::BROWSER_ANDROID`)
@@ -85,5 +88,24 @@ In an active project of mine we have a pretty graphically intensive and visually
85
88
86
89
Searching for a way to do this at the PHP layer and not at the client layer was more of a challenge than I would have guessed; the only script available was written by Gary White and Gary no longer maintains this script because of reliability. I do agree 100% with Gary about the readability; however, there are realistic reasons to desire the user.s browser and browser version and if your visitor is not echoing a false user agent we can take an educated guess.
87
90
88
-
I based this solution off of Gary White's original work but have since replaced all of his original code. Either way, thank you to Gary. Sadly, I never was able to get in touch with him regarding this soludion.
91
+
I based this solution off of Gary White's original work but have since replaced all of his original code. Either way, thank you to Gary. Sadly, I never was able to get in touch with him regarding this solution.
92
+
93
+
## Testing
94
+
95
+
The testing with PHPUnit against known user agents available in tests/lists. Each file is tab delimited with the following fields:
96
+
97
+
User Agent, User Agent Type, Browser, Version, Operating System, Operating System Version
98
+
99
+
eg
100
+
```
101
+
Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16 Browser Opera 12.16 Linux Linux
102
+
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1 Browser Chrome 14.0.835.186 Macintosh OS X 10_7_2
0 commit comments