Commit 49b062655596d5fff8954e3abdd9d09a208eec8f
1 parent
ef15440c
Remove unused phpSniff library
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4339 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
8 changed files
with
0 additions
and
1848 deletions
phpSniff/.htaccess deleted
phpSniff/CHANGES deleted
| 1 | -$Id: CHANGES,v 1.23 2003/07/02 23:31:55 epsilon7 Exp $ | |
| 2 | - | |
| 3 | -======================================================================== | |
| 4 | -Changes for version 2.1.3 | |
| 5 | -======================================================================== | |
| 6 | - * add k-meleon support | |
| 7 | - * add camino support | |
| 8 | - * add mozilla firebird support | |
| 9 | - * add amiga support | |
| 10 | - * fixed issues with netscape and gecko browsers | |
| 11 | - | |
| 12 | -======================================================================== | |
| 13 | -Changes for version 2.1.2 | |
| 14 | -======================================================================== | |
| 15 | -[2003.02.13] | |
| 16 | -rraymond : correctly identifies more browsers (galeon, phoenix, chimera, safari) | |
| 17 | -rraymond : fixes netscape/mozilla detection | |
| 18 | - | |
| 19 | -[2002.09.17] | |
| 20 | -rraymond : can now use '+' as alias for 'up' and '-' as alias for 'dn' | |
| 21 | -rraymond : cleanup of user_agent.inc file | |
| 22 | -rraymond : removed old test cookie code | |
| 23 | -rraymond : better mozilla/netscape differentiation | |
| 24 | -rraymond : added BrowseX support (short name = BX) | |
| 25 | - | |
| 26 | -[2002.09.13] | |
| 27 | -rraymond : fixes for some bad config settings | |
| 28 | -rraymond : Short Names List | |
| 29 | - Internet Explorer => IE | |
| 30 | - Netscape => NS | |
| 31 | - Mozilla => MZ | |
| 32 | - Opera => OP | |
| 33 | - Konqueror => KQ | |
| 34 | - Links => LI | |
| 35 | - Lynx => LX | |
| 36 | - NCSA Mosaic => MO | |
| 37 | - Amaya => AM | |
| 38 | - OmniWeb => OW | |
| 39 | - iCab => IC | |
| 40 | - HotJava => HJ | |
| 41 | - | |
| 42 | -======================================================================== | |
| 43 | -Changes for version 2.1.1 | |
| 44 | -======================================================================== | |
| 45 | -[2002.09.13] | |
| 46 | -gdavison : now correctly identifies MAC OSX | |
| 47 | - | |
| 48 | -======================================================================== | |
| 49 | -Changes for version 2.1.0 | |
| 50 | -======================================================================== | |
| 51 | -[2002.09.10] | |
| 52 | -rraymond : return false if user agent is not found | |
| 53 | -rraymond : fixed browser detection for browsers without a minor version | |
| 54 | -rraymond : correct detection of netscape 7 | |
| 55 | - | |
| 56 | -[2002.04.25] | |
| 57 | -rraymond : added check for Mac OSX | |
| 58 | - : $client->property('os') = 'osx' | |
| 59 | -rraymond : added new setting $_temp_file_path = '/tmp/'; | |
| 60 | - : this needs to be modified for the class to work on your server | |
| 61 | -rraymond : modified test_cookie routine to work on more platforms | |
| 62 | -medianes : cookie check fix | |
| 63 | -medianes : session and stored cookie checks | |
| 64 | -besfred : getenv insufficient fix | |
| 65 | -rraymond : simplified class instantiation | |
| 66 | - | |
| 67 | -[2002.03.06] | |
| 68 | -rraymond : modified _get_gecko() function to pull mozilla rv version | |
| 69 | -rraymond : new browser property gecko_ver returns mozilla rv version | |
| 70 | - : $client->property('gecko_ver'); | |
| 71 | - | |
| 72 | -[2002.02.11] | |
| 73 | -rraymond : renamed _insert() to _set_browser() in core | |
| 74 | -rraymond : new private function _set_feature() and _set_quirk() | |
| 75 | - : added to core | |
| 76 | -rraymond : added browser features and browser quirks settings | |
| 77 | -rraymond : modified _javascript_versions array to fix report for IE5UP | |
| 78 | -rraymond : added new methods has_feature() and has_quirk() | |
| 79 | - : $client->has_feature('css2'); | |
| 80 | - : $client->has_quirk('avoid_popup_windows'); | |
| 81 | -rraymond : added ability to search down from a version | |
| 82 | - : $client->is('b:ns4dn'); | |
| 83 | -rraymond : fixed PHP Warnings about undefined array index | |
| 84 | - : in _perform_browser_search() | |
| 85 | -rraymond : support added for Links and HotJava browsers (untested) | |
| 86 | - | |
| 87 | -======================================================================== | |
| 88 | -Changes for version 2.0.6 | |
| 89 | -======================================================================== | |
| 90 | -[2002.01.02] | |
| 91 | -rraymond : changed license from GPL to LGPL | |
| 92 | - | |
| 93 | -======================================================================== | |
| 94 | -Changes for version 2.0.5a | |
| 95 | -======================================================================== | |
| 96 | -[2001.12.21] | |
| 97 | -rraymond : fixed undeclared constants in check cookie routine | |
| 98 | - | |
| 99 | -======================================================================== | |
| 100 | -Changes for version 2.0.5 | |
| 101 | -======================================================================== | |
| 102 | -[2001.12.20] | |
| 103 | -rraymond : added support for Windows XP | |
| 104 | -rraymond : fixed some old Windows 98 version 9x 4.90 detection problems | |
| 105 | -rraymond : added Windows XP HTTP_USER_AGENT to user_agent.inc | |
| 106 | - | |
| 107 | -======================================================================== | |
| 108 | -Changes for version 2.0.4 | |
| 109 | -======================================================================== | |
| 110 | -[2001.12.17] | |
| 111 | -rraymond : added browser_is() method | |
| 112 | -rraymond : added language_is() method | |
| 113 | -rraymond : added get_property() alias for property() method | |
| 114 | -rraymond : added gecko property; reports mozilla build number (YYYYMMDD) | |
| 115 | -rraymond : added _browser_search_regex class var | |
| 116 | -rraymond : added _language_search_regex class var | |
| 117 | -rraymond : updated demo to use new methods | |
| 118 | - | |
| 119 | -======================================================================== | |
| 120 | -Changes for version 2.0.3 | |
| 121 | -======================================================================== | |
| 122 | -[2001.12.13] | |
| 123 | -rraymond : initialized variables | |
| 124 | -rraymond : fixed undeclared constants | |
| 125 | -rraymond : added new property long_name | |
| 126 | - : $client->property('long_name'); | |
| 127 | -rraymond : updated demo to display new long_name property | |
| 128 | - |
phpSniff/LICENSE deleted
| 1 | - GNU LESSER GENERAL PUBLIC LICENSE | |
| 2 | - Version 2.1, February 1999 | |
| 3 | - | |
| 4 | - Copyright (C) 1991, 1999 Free Software Foundation, Inc. | |
| 5 | - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 6 | - Everyone is permitted to copy and distribute verbatim copies | |
| 7 | - of this license document, but changing it is not allowed. | |
| 8 | - | |
| 9 | -[This is the first released version of the Lesser GPL. It also counts | |
| 10 | - as the successor of the GNU Library Public License, version 2, hence | |
| 11 | - the version number 2.1.] | |
| 12 | - | |
| 13 | - Preamble | |
| 14 | - | |
| 15 | - The licenses for most software are designed to take away your | |
| 16 | -freedom to share and change it. By contrast, the GNU General Public | |
| 17 | -Licenses are intended to guarantee your freedom to share and change | |
| 18 | -free software--to make sure the software is free for all its users. | |
| 19 | - | |
| 20 | - This license, the Lesser General Public License, applies to some | |
| 21 | -specially designated software packages--typically libraries--of the | |
| 22 | -Free Software Foundation and other authors who decide to use it. You | |
| 23 | -can use it too, but we suggest you first think carefully about whether | |
| 24 | -this license or the ordinary General Public License is the better | |
| 25 | -strategy to use in any particular case, based on the explanations below. | |
| 26 | - | |
| 27 | - When we speak of free software, we are referring to freedom of use, | |
| 28 | -not price. Our General Public Licenses are designed to make sure that | |
| 29 | -you have the freedom to distribute copies of free software (and charge | |
| 30 | -for this service if you wish); that you receive source code or can get | |
| 31 | -it if you want it; that you can change the software and use pieces of | |
| 32 | -it in new free programs; and that you are informed that you can do | |
| 33 | -these things. | |
| 34 | - | |
| 35 | - To protect your rights, we need to make restrictions that forbid | |
| 36 | -distributors to deny you these rights or to ask you to surrender these | |
| 37 | -rights. These restrictions translate to certain responsibilities for | |
| 38 | -you if you distribute copies of the library or if you modify it. | |
| 39 | - | |
| 40 | - For example, if you distribute copies of the library, whether gratis | |
| 41 | -or for a fee, you must give the recipients all the rights that we gave | |
| 42 | -you. You must make sure that they, too, receive or can get the source | |
| 43 | -code. If you link other code with the library, you must provide | |
| 44 | -complete object files to the recipients, so that they can relink them | |
| 45 | -with the library after making changes to the library and recompiling | |
| 46 | -it. And you must show them these terms so they know their rights. | |
| 47 | - | |
| 48 | - We protect your rights with a two-step method: (1) we copyright the | |
| 49 | -library, and (2) we offer you this license, which gives you legal | |
| 50 | -permission to copy, distribute and/or modify the library. | |
| 51 | - | |
| 52 | - To protect each distributor, we want to make it very clear that | |
| 53 | -there is no warranty for the free library. Also, if the library is | |
| 54 | -modified by someone else and passed on, the recipients should know | |
| 55 | -that what they have is not the original version, so that the original | |
| 56 | -author's reputation will not be affected by problems that might be | |
| 57 | -introduced by others. | |
| 58 | - | |
| 59 | - Finally, software patents pose a constant threat to the existence of | |
| 60 | -any free program. We wish to make sure that a company cannot | |
| 61 | -effectively restrict the users of a free program by obtaining a | |
| 62 | -restrictive license from a patent holder. Therefore, we insist that | |
| 63 | -any patent license obtained for a version of the library must be | |
| 64 | -consistent with the full freedom of use specified in this license. | |
| 65 | - | |
| 66 | - Most GNU software, including some libraries, is covered by the | |
| 67 | -ordinary GNU General Public License. This license, the GNU Lesser | |
| 68 | -General Public License, applies to certain designated libraries, and | |
| 69 | -is quite different from the ordinary General Public License. We use | |
| 70 | -this license for certain libraries in order to permit linking those | |
| 71 | -libraries into non-free programs. | |
| 72 | - | |
| 73 | - When a program is linked with a library, whether statically or using | |
| 74 | -a shared library, the combination of the two is legally speaking a | |
| 75 | -combined work, a derivative of the original library. The ordinary | |
| 76 | -General Public License therefore permits such linking only if the | |
| 77 | -entire combination fits its criteria of freedom. The Lesser General | |
| 78 | -Public License permits more lax criteria for linking other code with | |
| 79 | -the library. | |
| 80 | - | |
| 81 | - We call this license the "Lesser" General Public License because it | |
| 82 | -does Less to protect the user's freedom than the ordinary General | |
| 83 | -Public License. It also provides other free software developers Less | |
| 84 | -of an advantage over competing non-free programs. These disadvantages | |
| 85 | -are the reason we use the ordinary General Public License for many | |
| 86 | -libraries. However, the Lesser license provides advantages in certain | |
| 87 | -special circumstances. | |
| 88 | - | |
| 89 | - For example, on rare occasions, there may be a special need to | |
| 90 | -encourage the widest possible use of a certain library, so that it becomes | |
| 91 | -a de-facto standard. To achieve this, non-free programs must be | |
| 92 | -allowed to use the library. A more frequent case is that a free | |
| 93 | -library does the same job as widely used non-free libraries. In this | |
| 94 | -case, there is little to gain by limiting the free library to free | |
| 95 | -software only, so we use the Lesser General Public License. | |
| 96 | - | |
| 97 | - In other cases, permission to use a particular library in non-free | |
| 98 | -programs enables a greater number of people to use a large body of | |
| 99 | -free software. For example, permission to use the GNU C Library in | |
| 100 | -non-free programs enables many more people to use the whole GNU | |
| 101 | -operating system, as well as its variant, the GNU/Linux operating | |
| 102 | -system. | |
| 103 | - | |
| 104 | - Although the Lesser General Public License is Less protective of the | |
| 105 | -users' freedom, it does ensure that the user of a program that is | |
| 106 | -linked with the Library has the freedom and the wherewithal to run | |
| 107 | -that program using a modified version of the Library. | |
| 108 | - | |
| 109 | - The precise terms and conditions for copying, distribution and | |
| 110 | -modification follow. Pay close attention to the difference between a | |
| 111 | -"work based on the library" and a "work that uses the library". The | |
| 112 | -former contains code derived from the library, whereas the latter must | |
| 113 | -be combined with the library in order to run. | |
| 114 | - | |
| 115 | - GNU LESSER GENERAL PUBLIC LICENSE | |
| 116 | - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | |
| 117 | - | |
| 118 | - 0. This License Agreement applies to any software library or other | |
| 119 | -program which contains a notice placed by the copyright holder or | |
| 120 | -other authorized party saying it may be distributed under the terms of | |
| 121 | -this Lesser General Public License (also called "this License"). | |
| 122 | -Each licensee is addressed as "you". | |
| 123 | - | |
| 124 | - A "library" means a collection of software functions and/or data | |
| 125 | -prepared so as to be conveniently linked with application programs | |
| 126 | -(which use some of those functions and data) to form executables. | |
| 127 | - | |
| 128 | - The "Library", below, refers to any such software library or work | |
| 129 | -which has been distributed under these terms. A "work based on the | |
| 130 | -Library" means either the Library or any derivative work under | |
| 131 | -copyright law: that is to say, a work containing the Library or a | |
| 132 | -portion of it, either verbatim or with modifications and/or translated | |
| 133 | -straightforwardly into another language. (Hereinafter, translation is | |
| 134 | -included without limitation in the term "modification".) | |
| 135 | - | |
| 136 | - "Source code" for a work means the preferred form of the work for | |
| 137 | -making modifications to it. For a library, complete source code means | |
| 138 | -all the source code for all modules it contains, plus any associated | |
| 139 | -interface definition files, plus the scripts used to control compilation | |
| 140 | -and installation of the library. | |
| 141 | - | |
| 142 | - Activities other than copying, distribution and modification are not | |
| 143 | -covered by this License; they are outside its scope. The act of | |
| 144 | -running a program using the Library is not restricted, and output from | |
| 145 | -such a program is covered only if its contents constitute a work based | |
| 146 | -on the Library (independent of the use of the Library in a tool for | |
| 147 | -writing it). Whether that is true depends on what the Library does | |
| 148 | -and what the program that uses the Library does. | |
| 149 | - | |
| 150 | - 1. You may copy and distribute verbatim copies of the Library's | |
| 151 | -complete source code as you receive it, in any medium, provided that | |
| 152 | -you conspicuously and appropriately publish on each copy an | |
| 153 | -appropriate copyright notice and disclaimer of warranty; keep intact | |
| 154 | -all the notices that refer to this License and to the absence of any | |
| 155 | -warranty; and distribute a copy of this License along with the | |
| 156 | -Library. | |
| 157 | - | |
| 158 | - You may charge a fee for the physical act of transferring a copy, | |
| 159 | -and you may at your option offer warranty protection in exchange for a | |
| 160 | -fee. | |
| 161 | - | |
| 162 | - 2. You may modify your copy or copies of the Library or any portion | |
| 163 | -of it, thus forming a work based on the Library, and copy and | |
| 164 | -distribute such modifications or work under the terms of Section 1 | |
| 165 | -above, provided that you also meet all of these conditions: | |
| 166 | - | |
| 167 | - a) The modified work must itself be a software library. | |
| 168 | - | |
| 169 | - b) You must cause the files modified to carry prominent notices | |
| 170 | - stating that you changed the files and the date of any change. | |
| 171 | - | |
| 172 | - c) You must cause the whole of the work to be licensed at no | |
| 173 | - charge to all third parties under the terms of this License. | |
| 174 | - | |
| 175 | - d) If a facility in the modified Library refers to a function or a | |
| 176 | - table of data to be supplied by an application program that uses | |
| 177 | - the facility, other than as an argument passed when the facility | |
| 178 | - is invoked, then you must make a good faith effort to ensure that, | |
| 179 | - in the event an application does not supply such function or | |
| 180 | - table, the facility still operates, and performs whatever part of | |
| 181 | - its purpose remains meaningful. | |
| 182 | - | |
| 183 | - (For example, a function in a library to compute square roots has | |
| 184 | - a purpose that is entirely well-defined independent of the | |
| 185 | - application. Therefore, Subsection 2d requires that any | |
| 186 | - application-supplied function or table used by this function must | |
| 187 | - be optional: if the application does not supply it, the square | |
| 188 | - root function must still compute square roots.) | |
| 189 | - | |
| 190 | -These requirements apply to the modified work as a whole. If | |
| 191 | -identifiable sections of that work are not derived from the Library, | |
| 192 | -and can be reasonably considered independent and separate works in | |
| 193 | -themselves, then this License, and its terms, do not apply to those | |
| 194 | -sections when you distribute them as separate works. But when you | |
| 195 | -distribute the same sections as part of a whole which is a work based | |
| 196 | -on the Library, the distribution of the whole must be on the terms of | |
| 197 | -this License, whose permissions for other licensees extend to the | |
| 198 | -entire whole, and thus to each and every part regardless of who wrote | |
| 199 | -it. | |
| 200 | - | |
| 201 | -Thus, it is not the intent of this section to claim rights or contest | |
| 202 | -your rights to work written entirely by you; rather, the intent is to | |
| 203 | -exercise the right to control the distribution of derivative or | |
| 204 | -collective works based on the Library. | |
| 205 | - | |
| 206 | -In addition, mere aggregation of another work not based on the Library | |
| 207 | -with the Library (or with a work based on the Library) on a volume of | |
| 208 | -a storage or distribution medium does not bring the other work under | |
| 209 | -the scope of this License. | |
| 210 | - | |
| 211 | - 3. You may opt to apply the terms of the ordinary GNU General Public | |
| 212 | -License instead of this License to a given copy of the Library. To do | |
| 213 | -this, you must alter all the notices that refer to this License, so | |
| 214 | -that they refer to the ordinary GNU General Public License, version 2, | |
| 215 | -instead of to this License. (If a newer version than version 2 of the | |
| 216 | -ordinary GNU General Public License has appeared, then you can specify | |
| 217 | -that version instead if you wish.) Do not make any other change in | |
| 218 | -these notices. | |
| 219 | - | |
| 220 | - Once this change is made in a given copy, it is irreversible for | |
| 221 | -that copy, so the ordinary GNU General Public License applies to all | |
| 222 | -subsequent copies and derivative works made from that copy. | |
| 223 | - | |
| 224 | - This option is useful when you wish to copy part of the code of | |
| 225 | -the Library into a program that is not a library. | |
| 226 | - | |
| 227 | - 4. You may copy and distribute the Library (or a portion or | |
| 228 | -derivative of it, under Section 2) in object code or executable form | |
| 229 | -under the terms of Sections 1 and 2 above provided that you accompany | |
| 230 | -it with the complete corresponding machine-readable source code, which | |
| 231 | -must be distributed under the terms of Sections 1 and 2 above on a | |
| 232 | -medium customarily used for software interchange. | |
| 233 | - | |
| 234 | - If distribution of object code is made by offering access to copy | |
| 235 | -from a designated place, then offering equivalent access to copy the | |
| 236 | -source code from the same place satisfies the requirement to | |
| 237 | -distribute the source code, even though third parties are not | |
| 238 | -compelled to copy the source along with the object code. | |
| 239 | - | |
| 240 | - 5. A program that contains no derivative of any portion of the | |
| 241 | -Library, but is designed to work with the Library by being compiled or | |
| 242 | -linked with it, is called a "work that uses the Library". Such a | |
| 243 | -work, in isolation, is not a derivative work of the Library, and | |
| 244 | -therefore falls outside the scope of this License. | |
| 245 | - | |
| 246 | - However, linking a "work that uses the Library" with the Library | |
| 247 | -creates an executable that is a derivative of the Library (because it | |
| 248 | -contains portions of the Library), rather than a "work that uses the | |
| 249 | -library". The executable is therefore covered by this License. | |
| 250 | -Section 6 states terms for distribution of such executables. | |
| 251 | - | |
| 252 | - When a "work that uses the Library" uses material from a header file | |
| 253 | -that is part of the Library, the object code for the work may be a | |
| 254 | -derivative work of the Library even though the source code is not. | |
| 255 | -Whether this is true is especially significant if the work can be | |
| 256 | -linked without the Library, or if the work is itself a library. The | |
| 257 | -threshold for this to be true is not precisely defined by law. | |
| 258 | - | |
| 259 | - If such an object file uses only numerical parameters, data | |
| 260 | -structure layouts and accessors, and small macros and small inline | |
| 261 | -functions (ten lines or less in length), then the use of the object | |
| 262 | -file is unrestricted, regardless of whether it is legally a derivative | |
| 263 | -work. (Executables containing this object code plus portions of the | |
| 264 | -Library will still fall under Section 6.) | |
| 265 | - | |
| 266 | - Otherwise, if the work is a derivative of the Library, you may | |
| 267 | -distribute the object code for the work under the terms of Section 6. | |
| 268 | -Any executables containing that work also fall under Section 6, | |
| 269 | -whether or not they are linked directly with the Library itself. | |
| 270 | - | |
| 271 | - 6. As an exception to the Sections above, you may also combine or | |
| 272 | -link a "work that uses the Library" with the Library to produce a | |
| 273 | -work containing portions of the Library, and distribute that work | |
| 274 | -under terms of your choice, provided that the terms permit | |
| 275 | -modification of the work for the customer's own use and reverse | |
| 276 | -engineering for debugging such modifications. | |
| 277 | - | |
| 278 | - You must give prominent notice with each copy of the work that the | |
| 279 | -Library is used in it and that the Library and its use are covered by | |
| 280 | -this License. You must supply a copy of this License. If the work | |
| 281 | -during execution displays copyright notices, you must include the | |
| 282 | -copyright notice for the Library among them, as well as a reference | |
| 283 | -directing the user to the copy of this License. Also, you must do one | |
| 284 | -of these things: | |
| 285 | - | |
| 286 | - a) Accompany the work with the complete corresponding | |
| 287 | - machine-readable source code for the Library including whatever | |
| 288 | - changes were used in the work (which must be distributed under | |
| 289 | - Sections 1 and 2 above); and, if the work is an executable linked | |
| 290 | - with the Library, with the complete machine-readable "work that | |
| 291 | - uses the Library", as object code and/or source code, so that the | |
| 292 | - user can modify the Library and then relink to produce a modified | |
| 293 | - executable containing the modified Library. (It is understood | |
| 294 | - that the user who changes the contents of definitions files in the | |
| 295 | - Library will not necessarily be able to recompile the application | |
| 296 | - to use the modified definitions.) | |
| 297 | - | |
| 298 | - b) Use a suitable shared library mechanism for linking with the | |
| 299 | - Library. A suitable mechanism is one that (1) uses at run time a | |
| 300 | - copy of the library already present on the user's computer system, | |
| 301 | - rather than copying library functions into the executable, and (2) | |
| 302 | - will operate properly with a modified version of the library, if | |
| 303 | - the user installs one, as long as the modified version is | |
| 304 | - interface-compatible with the version that the work was made with. | |
| 305 | - | |
| 306 | - c) Accompany the work with a written offer, valid for at | |
| 307 | - least three years, to give the same user the materials | |
| 308 | - specified in Subsection 6a, above, for a charge no more | |
| 309 | - than the cost of performing this distribution. | |
| 310 | - | |
| 311 | - d) If distribution of the work is made by offering access to copy | |
| 312 | - from a designated place, offer equivalent access to copy the above | |
| 313 | - specified materials from the same place. | |
| 314 | - | |
| 315 | - e) Verify that the user has already received a copy of these | |
| 316 | - materials or that you have already sent this user a copy. | |
| 317 | - | |
| 318 | - For an executable, the required form of the "work that uses the | |
| 319 | -Library" must include any data and utility programs needed for | |
| 320 | -reproducing the executable from it. However, as a special exception, | |
| 321 | -the materials to be distributed need not include anything that is | |
| 322 | -normally distributed (in either source or binary form) with the major | |
| 323 | -components (compiler, kernel, and so on) of the operating system on | |
| 324 | -which the executable runs, unless that component itself accompanies | |
| 325 | -the executable. | |
| 326 | - | |
| 327 | - It may happen that this requirement contradicts the license | |
| 328 | -restrictions of other proprietary libraries that do not normally | |
| 329 | -accompany the operating system. Such a contradiction means you cannot | |
| 330 | -use both them and the Library together in an executable that you | |
| 331 | -distribute. | |
| 332 | - | |
| 333 | - 7. You may place library facilities that are a work based on the | |
| 334 | -Library side-by-side in a single library together with other library | |
| 335 | -facilities not covered by this License, and distribute such a combined | |
| 336 | -library, provided that the separate distribution of the work based on | |
| 337 | -the Library and of the other library facilities is otherwise | |
| 338 | -permitted, and provided that you do these two things: | |
| 339 | - | |
| 340 | - a) Accompany the combined library with a copy of the same work | |
| 341 | - based on the Library, uncombined with any other library | |
| 342 | - facilities. This must be distributed under the terms of the | |
| 343 | - Sections above. | |
| 344 | - | |
| 345 | - b) Give prominent notice with the combined library of the fact | |
| 346 | - that part of it is a work based on the Library, and explaining | |
| 347 | - where to find the accompanying uncombined form of the same work. | |
| 348 | - | |
| 349 | - 8. You may not copy, modify, sublicense, link with, or distribute | |
| 350 | -the Library except as expressly provided under this License. Any | |
| 351 | -attempt otherwise to copy, modify, sublicense, link with, or | |
| 352 | -distribute the Library is void, and will automatically terminate your | |
| 353 | -rights under this License. However, parties who have received copies, | |
| 354 | -or rights, from you under this License will not have their licenses | |
| 355 | -terminated so long as such parties remain in full compliance. | |
| 356 | - | |
| 357 | - 9. You are not required to accept this License, since you have not | |
| 358 | -signed it. However, nothing else grants you permission to modify or | |
| 359 | -distribute the Library or its derivative works. These actions are | |
| 360 | -prohibited by law if you do not accept this License. Therefore, by | |
| 361 | -modifying or distributing the Library (or any work based on the | |
| 362 | -Library), you indicate your acceptance of this License to do so, and | |
| 363 | -all its terms and conditions for copying, distributing or modifying | |
| 364 | -the Library or works based on it. | |
| 365 | - | |
| 366 | - 10. Each time you redistribute the Library (or any work based on the | |
| 367 | -Library), the recipient automatically receives a license from the | |
| 368 | -original licensor to copy, distribute, link with or modify the Library | |
| 369 | -subject to these terms and conditions. You may not impose any further | |
| 370 | -restrictions on the recipients' exercise of the rights granted herein. | |
| 371 | -You are not responsible for enforcing compliance by third parties with | |
| 372 | -this License. | |
| 373 | - | |
| 374 | - 11. If, as a consequence of a court judgment or allegation of patent | |
| 375 | -infringement or for any other reason (not limited to patent issues), | |
| 376 | -conditions are imposed on you (whether by court order, agreement or | |
| 377 | -otherwise) that contradict the conditions of this License, they do not | |
| 378 | -excuse you from the conditions of this License. If you cannot | |
| 379 | -distribute so as to satisfy simultaneously your obligations under this | |
| 380 | -License and any other pertinent obligations, then as a consequence you | |
| 381 | -may not distribute the Library at all. For example, if a patent | |
| 382 | -license would not permit royalty-free redistribution of the Library by | |
| 383 | -all those who receive copies directly or indirectly through you, then | |
| 384 | -the only way you could satisfy both it and this License would be to | |
| 385 | -refrain entirely from distribution of the Library. | |
| 386 | - | |
| 387 | -If any portion of this section is held invalid or unenforceable under any | |
| 388 | -particular circumstance, the balance of the section is intended to apply, | |
| 389 | -and the section as a whole is intended to apply in other circumstances. | |
| 390 | - | |
| 391 | -It is not the purpose of this section to induce you to infringe any | |
| 392 | -patents or other property right claims or to contest validity of any | |
| 393 | -such claims; this section has the sole purpose of protecting the | |
| 394 | -integrity of the free software distribution system which is | |
| 395 | -implemented by public license practices. Many people have made | |
| 396 | -generous contributions to the wide range of software distributed | |
| 397 | -through that system in reliance on consistent application of that | |
| 398 | -system; it is up to the author/donor to decide if he or she is willing | |
| 399 | -to distribute software through any other system and a licensee cannot | |
| 400 | -impose that choice. | |
| 401 | - | |
| 402 | -This section is intended to make thoroughly clear what is believed to | |
| 403 | -be a consequence of the rest of this License. | |
| 404 | - | |
| 405 | - 12. If the distribution and/or use of the Library is restricted in | |
| 406 | -certain countries either by patents or by copyrighted interfaces, the | |
| 407 | -original copyright holder who places the Library under this License may add | |
| 408 | -an explicit geographical distribution limitation excluding those countries, | |
| 409 | -so that distribution is permitted only in or among countries not thus | |
| 410 | -excluded. In such case, this License incorporates the limitation as if | |
| 411 | -written in the body of this License. | |
| 412 | - | |
| 413 | - 13. The Free Software Foundation may publish revised and/or new | |
| 414 | -versions of the Lesser General Public License from time to time. | |
| 415 | -Such new versions will be similar in spirit to the present version, | |
| 416 | -but may differ in detail to address new problems or concerns. | |
| 417 | - | |
| 418 | -Each version is given a distinguishing version number. If the Library | |
| 419 | -specifies a version number of this License which applies to it and | |
| 420 | -"any later version", you have the option of following the terms and | |
| 421 | -conditions either of that version or of any later version published by | |
| 422 | -the Free Software Foundation. If the Library does not specify a | |
| 423 | -license version number, you may choose any version ever published by | |
| 424 | -the Free Software Foundation. | |
| 425 | - | |
| 426 | - 14. If you wish to incorporate parts of the Library into other free | |
| 427 | -programs whose distribution conditions are incompatible with these, | |
| 428 | -write to the author to ask for permission. For software which is | |
| 429 | -copyrighted by the Free Software Foundation, write to the Free | |
| 430 | -Software Foundation; we sometimes make exceptions for this. Our | |
| 431 | -decision will be guided by the two goals of preserving the free status | |
| 432 | -of all derivatives of our free software and of promoting the sharing | |
| 433 | -and reuse of software generally. | |
| 434 | - | |
| 435 | - NO WARRANTY | |
| 436 | - | |
| 437 | - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO | |
| 438 | -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. | |
| 439 | -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR | |
| 440 | -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY | |
| 441 | -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE | |
| 442 | -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
| 443 | -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE | |
| 444 | -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME | |
| 445 | -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. | |
| 446 | - | |
| 447 | - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN | |
| 448 | -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY | |
| 449 | -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU | |
| 450 | -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR | |
| 451 | -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE | |
| 452 | -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING | |
| 453 | -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A | |
| 454 | -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF | |
| 455 | -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH | |
| 456 | -DAMAGES. | |
| 457 | - | |
| 458 | - END OF TERMS AND CONDITIONS | |
| 459 | - | |
| 460 | - |
phpSniff/index.php deleted
| 1 | -<?php | |
| 2 | -error_reporting(E_ALL); | |
| 3 | -/******************************************************************************* | |
| 4 | - $Id: index.php,v 1.17 2003/07/02 23:28:35 epsilon7 Exp $ | |
| 5 | - | |
| 6 | - phpSniff: HTTP_USER_AGENT Client Sniffer for PHP | |
| 7 | - Copyright (C) 2001 Roger Raymond ~ epsilon7@users.sourceforge.net | |
| 8 | - | |
| 9 | - This library is free software; you can redistribute it and/or | |
| 10 | - modify it under the terms of the GNU Lesser General Public | |
| 11 | - License as published by the Free Software Foundation; either | |
| 12 | - version 2.1 of the License, or (at your option) any later version. | |
| 13 | - | |
| 14 | - This library is distributed in the hope that it will be useful, | |
| 15 | - but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 16 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 17 | - Lesser General Public License for more details. | |
| 18 | - | |
| 19 | - You should have received a copy of the GNU Lesser General Public | |
| 20 | - License along with this library; if not, write to the Free Software | |
| 21 | - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 22 | -*******************************************************************************/ | |
| 23 | - | |
| 24 | -require_once('phpSniff.class.php'); | |
| 25 | -require_once('phpTimer.class.php'); | |
| 26 | - | |
| 27 | -//echo '<pre>'; | |
| 28 | -//print_r($_COOKIE); | |
| 29 | -//echo '</pre>'; | |
| 30 | - | |
| 31 | -// initialize some vars | |
| 32 | -$GET_VARS = isset($_GET) ? $_GET : $HTTP_GET_VARS; | |
| 33 | -$POST_VARS = isset($_POST) ? $_GET : $HTTP_POST_VARS; | |
| 34 | -if(!isset($GET_VARS['UA'])) $GET_VARS['UA'] = ''; | |
| 35 | -if(!isset($GET_VARS['cc'])) $GET_VARS['cc'] = ''; | |
| 36 | -if(!isset($GET_VARS['dl'])) $GET_VARS['dl'] = ''; | |
| 37 | -if(!isset($GET_VARS['am'])) $GET_VARS['am'] = ''; | |
| 38 | - | |
| 39 | -$timer =& new phpTimer(); | |
| 40 | -$timer->start('main'); | |
| 41 | -$timer->start('client1'); | |
| 42 | -$sniffer_settings = array('check_cookies'=>$GET_VARS['cc'], | |
| 43 | - 'default_language'=>$GET_VARS['dl'], | |
| 44 | - 'allow_masquerading'=>$GET_VARS['am']); | |
| 45 | -$client =& new phpSniff($GET_VARS['UA'],$sniffer_settings); | |
| 46 | - | |
| 47 | -$timer->stop('client1'); | |
| 48 | - | |
| 49 | -$c1_bg = '#cccccc'; | |
| 50 | -$c2_bg = '#ffffff'; | |
| 51 | -$c3_bg = '#000000'; | |
| 52 | - | |
| 53 | -function makeSelectOption ($link,$text) | |
| 54 | -{ global $client; | |
| 55 | - $o = "<option value=\"$link\""; | |
| 56 | - $o .= $client->property('ua') == strtolower($link) ? ' selected' : ''; | |
| 57 | - $o .= ">$text</option>"; | |
| 58 | - print $o; | |
| 59 | -} | |
| 60 | - | |
| 61 | -function example ($search,$output) | |
| 62 | -{ global $c2_bg, $c1_bg, $client; | |
| 63 | - ?> | |
| 64 | - <tr> | |
| 65 | - <td bgcolor="<?php print $c1_bg; ?>"><?php print $search; ?></td> | |
| 66 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $output ? 'true' : 'false'; ?></td> | |
| 67 | - </tr> | |
| 68 | - <?php | |
| 69 | -} | |
| 70 | - | |
| 71 | -function is ($search) | |
| 72 | -{ global $client; | |
| 73 | - example($search,$client->is($search)); | |
| 74 | -} | |
| 75 | -function language_is ($search) | |
| 76 | -{ global $client; | |
| 77 | - example($search,$client->language_is($search)); | |
| 78 | -} | |
| 79 | - | |
| 80 | -function browser_is ($search) | |
| 81 | -{ global $client; | |
| 82 | - example($search,$client->browser_is($search)); | |
| 83 | -} | |
| 84 | - | |
| 85 | -function has_feature ($feature) | |
| 86 | -{ global $client; | |
| 87 | - example($feature,$client->has_feature($feature)); | |
| 88 | -} | |
| 89 | - | |
| 90 | -function has_quirk ($quirk) | |
| 91 | -{ global $client; | |
| 92 | - example($quirk,$client->has_quirk($quirk)); | |
| 93 | -} | |
| 94 | - | |
| 95 | -?> | |
| 96 | -<html> | |
| 97 | -<head> | |
| 98 | -<title>phpSniff <?php print $client->_version; ?> on SourceForge</title> | |
| 99 | -<style type="text/css"> | |
| 100 | -INPUT, SELECT { | |
| 101 | - background-color: #c8c8c8; | |
| 102 | - font-family: monospace; | |
| 103 | - font-size: 10px; | |
| 104 | -} | |
| 105 | -BODY { | |
| 106 | - background-color: #ffffff; | |
| 107 | - font-family: sans-serif; | |
| 108 | - font-size: 10px; | |
| 109 | -} | |
| 110 | -TD { | |
| 111 | - font-family: sans-serif; | |
| 112 | - font-size: 10px; | |
| 113 | -} | |
| 114 | -</style> | |
| 115 | -</head> | |
| 116 | -<body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0"> | |
| 117 | -<?php | |
| 118 | -// fix for cgi versions of php ~ 6/28/2001 ~ RR | |
| 119 | -$script_path = getenv('PATH_INFO') ? getenv('PATH_INFO') : getenv('SCRIPT_NAME'); | |
| 120 | -?> | |
| 121 | -<form name="user_agent_string" method="get" action="<?php print $script_path; ?>"> | |
| 122 | -<p><a href="http://sourceforge.net/project/showfiles.php?group_id=26044">Download</a> | | |
| 123 | -<a href="http://sourceforge.net/projects/phpsniff/">SourceForge Project Page</a> | | |
| 124 | -<a href="index.phps">Index Source Code</a> | | |
| 125 | -<a href="phpSniff.core.phps">phpSniff.core Source Code</a> | | |
| 126 | -<a href="phpSniff.class.phps">phpSniff.class Source Code</a> | | |
| 127 | -<a href="CHANGES">CHANGE LOG</a> | |
| 128 | -</p> | |
| 129 | -<table border="0" cellpadding="3" cellspacing="0" bgcolor="<?php print $c3_bg; ?>" width="100%"> | |
| 130 | -<tr> | |
| 131 | -<td align="left" valign="top" width="100%"> | |
| 132 | - <font color="#ffffff"><b>CURRENT BROWSER INFORMATION</b></font><br> | |
| 133 | - <font color="#ffffff" size="-1"> | |
| 134 | - <?php printf('phpSniff version : %s - php version : %s</font>',$client->_version, PHP_VERSION); ?> | |
| 135 | - </font> | |
| 136 | -</td> | |
| 137 | -<td align="right" valign="top" width="100%"> | |
| 138 | - <font color="#ffffff"> | |
| 139 | - <select name="UA"> | |
| 140 | - <?php | |
| 141 | - makeSelectOption('','Your current browser'); | |
| 142 | - include('user_agent.inc'); | |
| 143 | - while(list(,$v) = each($user_agent)) | |
| 144 | - { makeSelectOption($v,$v); | |
| 145 | - } | |
| 146 | - ?> | |
| 147 | - </select><br> | |
| 148 | - <input type="checkbox" name="cc" <?php if($client->_check_cookies) print 'checked'; ?> > Check For Cookies | |
| 149 | - <input type="checkbox" name="am" <?php if($client->_allow_masquerading) print 'checked'; ?> > Allow Masquerading | |
| 150 | - <input type="text" name="dl" size="7" value="<?php print $client->_default_language; ?>"> Default Language | |
| 151 | - <input type="submit" name="submit" value="submit"> | |
| 152 | - </font> | |
| 153 | -</td> | |
| 154 | -</tr> | |
| 155 | -</table> | |
| 156 | - | |
| 157 | -<table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="<?php print $c3_bg; ?>"><tr> | |
| 158 | -<td align="right" valign="top"> | |
| 159 | - <table border="0" cellpadding="3" cellspacing="1" width="100%"> | |
| 160 | - <tr><td colspan="2" nowrap><font color="#ffcc00">Current Configuration</font></td></tr> | |
| 161 | - <tr> | |
| 162 | - <td colspan="2"bgcolor="<?php print $c1_bg; ?>"><b>regex used to search HTTP_USER_AGENT string</b><br> | |
| 163 | - preg_match_all("<?php print $client->_browser_regex; ?>");</td> | |
| 164 | - </tr> | |
| 165 | - <tr> | |
| 166 | - <td bgcolor="<?php print $c1_bg; ?>">$_check_cookies</td> | |
| 167 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->_check_cookies ? 'true' : 'false'; ?></td> | |
| 168 | - </tr> | |
| 169 | - <tr> | |
| 170 | - <td bgcolor="<?php print $c1_bg; ?>">$_default_language</td> | |
| 171 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->_default_language; ?></td> | |
| 172 | - </tr> | |
| 173 | - <tr> | |
| 174 | - <td bgcolor="<?php print $c1_bg; ?>">$_allow_masquerading</td> | |
| 175 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->_allow_masquerading ? 'true' : 'false'; ?></td> | |
| 176 | - </tr> | |
| 177 | - | |
| 178 | - <tr><td colspan="2" nowrap><font color="#ffcc00">$client->property(<i>property_name</i>);</font></td></tr> | |
| 179 | - <tr> | |
| 180 | - <td bgcolor="<?php print $c1_bg; ?>"><b>property_name</b></td> | |
| 181 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><b>return value</b></td> | |
| 182 | - </tr> | |
| 183 | - <tr> | |
| 184 | - <td bgcolor="<?php print $c1_bg; ?>">ua</td> | |
| 185 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->get_property('ua');?></td> | |
| 186 | - </tr> | |
| 187 | - <tr> | |
| 188 | - <td bgcolor="<?php print $c1_bg; ?>">browser</td> | |
| 189 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->property('browser'); ?></td> | |
| 190 | - </tr> | |
| 191 | - <tr> | |
| 192 | - <td bgcolor="<?php print $c1_bg; ?>">long_name</td> | |
| 193 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->property('long_name');?></td> | |
| 194 | - </tr> | |
| 195 | - <tr> | |
| 196 | - <td bgcolor="<?php print $c1_bg; ?>">version</td> | |
| 197 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->property('version');?></td> | |
| 198 | - </tr> | |
| 199 | - <tr> | |
| 200 | - <td bgcolor="<?php print $c1_bg; ?>">maj_ver</td> | |
| 201 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->property('maj_ver');?></td> | |
| 202 | - </tr> | |
| 203 | - <tr> | |
| 204 | - <td bgcolor="<?php print $c1_bg; ?>">min_ver</td> | |
| 205 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->property('min_ver');?></td> | |
| 206 | - </tr> | |
| 207 | - <tr> | |
| 208 | - <td bgcolor="<?php print $c1_bg; ?>">letter_ver</td> | |
| 209 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->property('letter_ver');?></td> | |
| 210 | - </tr> | |
| 211 | - <tr> | |
| 212 | - <td bgcolor="<?php print $c1_bg; ?>">javascript</td> | |
| 213 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->property('javascript');?></td> | |
| 214 | - </tr> | |
| 215 | - <tr> | |
| 216 | - <td bgcolor="<?php print $c1_bg; ?>">platform</td> | |
| 217 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->property('platform');?></td> | |
| 218 | - </tr> | |
| 219 | - <tr> | |
| 220 | - <td bgcolor="<?php print $c1_bg; ?>">os</td> | |
| 221 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->property('os');?></td> | |
| 222 | - </tr> | |
| 223 | - <tr> | |
| 224 | - <td bgcolor="<?php print $c1_bg; ?>">session cookies</td> | |
| 225 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print ($ssc=$client->property('ss_cookies'))=='Unknown'?$ssc:($ssc?'true':'false');?></td> | |
| 226 | - | |
| 227 | - </tr> | |
| 228 | - <tr> | |
| 229 | - <td bgcolor="<?php print $c1_bg; ?>">stored cookies</td> | |
| 230 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print ($stc=$client->property('st_cookies'))=='Unknown'?$stc:($stc?'true':'false');?></td> | |
| 231 | - </tr> | |
| 232 | - <tr> | |
| 233 | - <td bgcolor="<?php print $c1_bg; ?>">ip</td> | |
| 234 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->property('ip');?></td> | |
| 235 | - </tr> | |
| 236 | - <tr> | |
| 237 | - <td bgcolor="<?php print $c1_bg; ?>">language</td> | |
| 238 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->property('language');?></td> | |
| 239 | - </tr> | |
| 240 | - <tr> | |
| 241 | - <td bgcolor="<?php print $c1_bg; ?>">gecko</td> | |
| 242 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->property('gecko');?></td> | |
| 243 | - </tr> | |
| 244 | - <tr> | |
| 245 | - <td bgcolor="<?php print $c1_bg; ?>">gecko_ver</td> | |
| 246 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>"><?php print $client->property('gecko_ver');?></td> | |
| 247 | - </tr> | |
| 248 | - </table> | |
| 249 | -</td> | |
| 250 | -<td align="left" valign="top"> | |
| 251 | - <table border="0" cellpadding="3" cellspacing="1" width="100%"> | |
| 252 | - <tr><td colspan="2" nowrap><font color="#ffcc00"> </font></td></tr> | |
| 253 | - <tr> | |
| 254 | - <td bgcolor="<?php print $c1_bg; ?>" nowrap><b>search_phrase</b></td> | |
| 255 | - <td width="100%" bgcolor="<?php print $c2_bg; ?>" nowrap><b>return boolean</b></td> | |
| 256 | - </tr> | |
| 257 | - | |
| 258 | - <!-- feature search --> | |
| 259 | - <tr> | |
| 260 | - <td bgcolor="<?php print $c3_bg; ?>" colspan="2" nowrap><font color="#ffcc00">$client->has_feature(<i>feature</i>)</font></td> | |
| 261 | - </tr> | |
| 262 | - <?php | |
| 263 | - has_feature('html'); | |
| 264 | - has_feature('images'); | |
| 265 | - has_feature('frames'); | |
| 266 | - has_feature('tables'); | |
| 267 | - has_feature('java'); | |
| 268 | - has_feature('plugins'); | |
| 269 | - has_feature('css2'); | |
| 270 | - has_feature('css1'); | |
| 271 | - has_feature('iframes'); | |
| 272 | - has_feature('xml'); | |
| 273 | - has_feature('dom'); | |
| 274 | - has_feature('hdml'); | |
| 275 | - has_feature('wml'); | |
| 276 | - ?> | |
| 277 | - <!-- quirks --> | |
| 278 | - <tr> | |
| 279 | - <td bgcolor="<?php print $c3_bg; ?>" colspan="2" nowrap><font color="#ffcc00">$client->has_quirk(<i>quirk</i>)</font></td> | |
| 280 | - </tr> | |
| 281 | - <?php | |
| 282 | - has_quirk('must_cache_forms'); | |
| 283 | - has_quirk('avoid_popup_windows'); | |
| 284 | - has_quirk('cache_ssl_downloads'); | |
| 285 | - has_quirk('break_disposition_header'); | |
| 286 | - has_quirk('empty_file_input_value'); | |
| 287 | - has_quirk('scrollbar_in_way'); | |
| 288 | - ?> | |
| 289 | - <!-- browser_is search --> | |
| 290 | - <tr> | |
| 291 | - <td bgcolor="<?php print $c3_bg; ?>" colspan="2" nowrap><font color="#ffcc00">$client->browser_is(<i>browser</i>)</font></td> | |
| 292 | - </tr> | |
| 293 | - <?php | |
| 294 | - browser_is('aol'); | |
| 295 | - browser_is('ie6+'); | |
| 296 | - browser_is('mz1.3+'); | |
| 297 | - browser_is('ns7+'); | |
| 298 | - browser_is('op6+'); | |
| 299 | - ?> | |
| 300 | - <!-- language_is search --> | |
| 301 | - <tr> | |
| 302 | - <td bgcolor="<?php print $c3_bg; ?>" colspan="2" nowrap><font color="#ffcc00">$client->language_is(<i>language</i>)</font></td> | |
| 303 | - </tr> | |
| 304 | - <?php | |
| 305 | - language_is('en'); | |
| 306 | - language_is('en-us'); | |
| 307 | - language_is('fr-ca'); | |
| 308 | - ?> | |
| 309 | - <!-- old style search --> | |
| 310 | - <tr> | |
| 311 | - <td bgcolor="<?php print $c3_bg; ?>" colspan="2" nowrap><font color="#ffcc00">$client->is(<i>search</i>)</font></td> | |
| 312 | - </tr> | |
| 313 | - <?php | |
| 314 | - is('b:ns7-'); | |
| 315 | - is('l:en-us'); | |
| 316 | - ?> | |
| 317 | - </table> | |
| 318 | -</td></tr></table> | |
| 319 | -</form> | |
| 320 | -<p> | |
| 321 | -<?php | |
| 322 | -$timer->stop('main'); | |
| 323 | -printf("<pre>\n". | |
| 324 | - "client instantiation time : %s\n" . | |
| 325 | - "page execution time : %s\n" . | |
| 326 | - "</pre>" , | |
| 327 | - $timer->get_current('client1'), | |
| 328 | - $timer->get_current('main')); | |
| 329 | -?> | |
| 330 | -</p> | |
| 331 | -<?php | |
| 332 | -print ('<p align="left"><font size="-2">_______________________________<br>'); | |
| 333 | -print ('Copyleft 2001-2003 Simian Synapse, LLC.<br></font></p>'); | |
| 334 | -?> | |
| 335 | -<p align="center"> | |
| 336 | -<A href="http://sourceforge.net"><IMG | |
| 337 | -src="http://sourceforge.net/sflogo.php?group_id=26044" | |
| 338 | -width="88" height="31" border="0" alt="SourceForge Logo"></A> | |
| 339 | -</p> | |
| 340 | -</body> | |
| 341 | -</html> | |
| 342 | 0 | \ No newline at end of file |
phpSniff/phpSniff.class.php deleted
| 1 | -<?php | |
| 2 | -/******************************************************************************* | |
| 3 | - $Id: phpSniff.class.php,v 1.21 2003/07/02 23:28:35 epsilon7 Exp $ | |
| 4 | - | |
| 5 | - phpSniff: HTTP_USER_AGENT Client Sniffer for PHP | |
| 6 | - Copyright (C) 2001 Roger Raymond ~ epsilon7@users.sourceforge.net | |
| 7 | - | |
| 8 | - This library is free software; you can redistribute it and/or | |
| 9 | - modify it under the terms of the GNU Lesser General Public | |
| 10 | - License as published by the Free Software Foundation; either | |
| 11 | - version 2.1 of the License, or (at your option) any later version. | |
| 12 | - | |
| 13 | - This library is distributed in the hope that it will be useful, | |
| 14 | - but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 16 | - Lesser General Public License for more details. | |
| 17 | - | |
| 18 | - You should have received a copy of the GNU Lesser General Public | |
| 19 | - License along with this library; if not, write to the Free Software | |
| 20 | - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 21 | -*******************************************************************************/ | |
| 22 | -require_once('phpSniff.core.php'); | |
| 23 | - | |
| 24 | -//=============================================================== | |
| 25 | -// the following defines are used to create the short | |
| 26 | -// browser name used throughout the script. | |
| 27 | -// change these to suit your needs | |
| 28 | -//=============================================================== | |
| 29 | - | |
| 30 | -class phpSniff extends phpSniff_core | |
| 31 | -{ var $_version = '2.1.3'; | |
| 32 | - /** | |
| 33 | - * Configuration | |
| 34 | - * | |
| 35 | - * $_temp_file_path | |
| 36 | - * default : /tmp/ | |
| 37 | - * desc : directory writable by the server to store cookie check files. | |
| 38 | - * : trailing slash is needed. only used if you use the check cookie routine | |
| 39 | - * | |
| 40 | - * $_check_cookies | |
| 41 | - * default : null | |
| 42 | - * desc : Allow for the script to redirect the browser in order | |
| 43 | - * : to check for cookies. In order for this to work, this | |
| 44 | - * : class must be instantiated before any headers are sent. | |
| 45 | - * | |
| 46 | - * $_default_language | |
| 47 | - * default : en-us | |
| 48 | - * desc : language to report as if no languages are found | |
| 49 | - * | |
| 50 | - * $_allow_masquerading | |
| 51 | - * default : null | |
| 52 | - * desc : Allow for browser to Masquerade as another. | |
| 53 | - * : (ie: Opera identifies as MSIE 5.0) | |
| 54 | - * | |
| 55 | - * $_browsers | |
| 56 | - * desc : 2D Array of browsers we wish to search for | |
| 57 | - * : in key => value pairs. | |
| 58 | - * : key = browser to search for [as in HTTP_USER_AGENT] | |
| 59 | - * : value = value to return as 'browser' property | |
| 60 | - * | |
| 61 | - * $_javascript_versions | |
| 62 | - * desc : 2D Array of javascript version supported by which browser | |
| 63 | - * : in key => value pairs. | |
| 64 | - * : key = javascript version | |
| 65 | - * : value = search parameter for browsers that support the | |
| 66 | - * : javascript version listed in the key (comma delimited) | |
| 67 | - * : note: the search parameters rely on the values | |
| 68 | - * : set in the $_browsers array | |
| 69 | - * | |
| 70 | - * $_browser_features | |
| 71 | - * desc : 2D Array of browser features supported by which browser | |
| 72 | - * : in key => value pairs. | |
| 73 | - * : key = feature | |
| 74 | - * : value = search parameter for browsers that support the | |
| 75 | - * : feature listed in the key (comma delimited) | |
| 76 | - * : note: the search parameters rely on the values | |
| 77 | - * : set in the $_browsers array | |
| 78 | - * | |
| 79 | - * $_browser_quirks | |
| 80 | - * desc : 2D Array of browser quirks present in which browser | |
| 81 | - * : in key => value pairs. | |
| 82 | - * : key = quirk | |
| 83 | - * : value = search parameter for browsers that feature the | |
| 84 | - * : quirk listed in the key (comma delimited) | |
| 85 | - * : note: the search parameters rely on the values | |
| 86 | - * : set in the $_browsers array | |
| 87 | - **/ | |
| 88 | - | |
| 89 | - var $_temp_file_path = '/tmp/'; // with trailing slash | |
| 90 | - var $_check_cookies = NULL; | |
| 91 | - var $_default_language = 'en-us'; | |
| 92 | - var $_allow_masquerading = NULL; | |
| 93 | - var $_php_version = ''; | |
| 94 | - | |
| 95 | - var $_browsers = array( | |
| 96 | - 'microsoft internet explorer' => 'IE', | |
| 97 | - 'msie' => 'IE', | |
| 98 | - 'netscape6' => 'NS', | |
| 99 | - 'netscape' => 'NS', | |
| 100 | - 'galeon' => 'GA', | |
| 101 | - 'phoenix' => 'PX', | |
| 102 | - 'mozilla firebird' => 'FB', | |
| 103 | - 'firebird' => 'FB', | |
| 104 | - 'chimera' => 'CH', | |
| 105 | - 'camino' => 'CA', | |
| 106 | - 'safari' => 'SF', | |
| 107 | - 'k-meleon' => 'KM', | |
| 108 | - 'mozilla' => 'MZ', | |
| 109 | - 'opera' => 'OP', | |
| 110 | - 'konqueror' => 'KQ', | |
| 111 | - 'icab' => 'IC', | |
| 112 | - 'lynx' => 'LX', | |
| 113 | - 'links' => 'LI', | |
| 114 | - 'ncsa mosaic' => 'MO', | |
| 115 | - 'amaya' => 'AM', | |
| 116 | - 'omniweb' => 'OW', | |
| 117 | - 'hotjava' => 'HJ', | |
| 118 | - 'browsex' => 'BX', | |
| 119 | - 'amigavoyager' => 'AV', | |
| 120 | - 'amiga-aweb' => 'AW', | |
| 121 | - 'ibrowse' => 'IB' | |
| 122 | - ); | |
| 123 | - | |
| 124 | - var $_javascript_versions = array( | |
| 125 | - '1.5' => 'NS5+,MZ,PX,FB,GA,CH,CA,SF,KQ3+,KM', // browsers that support JavaScript 1.5 | |
| 126 | - '1.4' => '', | |
| 127 | - '1.3' => 'NS4.05+,OP5+,IE5+', | |
| 128 | - '1.2' => 'NS4+,IE4+', | |
| 129 | - '1.1' => 'NS3+,OP,KQ', | |
| 130 | - '1.0' => 'NS2+,IE3+', | |
| 131 | - '0' => 'LI,LX,HJ' | |
| 132 | - ); | |
| 133 | - | |
| 134 | - var $_browser_features = array( | |
| 135 | - /** | |
| 136 | - * the following are true by default | |
| 137 | - * (see phpSniff.core.php $_feature_set array) | |
| 138 | - * browsers listed here will be set to false | |
| 139 | - **/ | |
| 140 | - 'html' => '', | |
| 141 | - 'images' => 'LI,LX', | |
| 142 | - 'frames' => 'LI,LX', | |
| 143 | - 'tables' => '', | |
| 144 | - 'java' => 'OP3,LI,LX,NS1,MO,IE1,IE2', | |
| 145 | - 'plugins' => 'IE1,IE2,LI,LX', | |
| 146 | - /** | |
| 147 | - * the following are false by default | |
| 148 | - * (see phpSniff.core.php $_feature_set array) | |
| 149 | - * browsers listed here will be set to true | |
| 150 | - **/ | |
| 151 | - 'css2' => 'NS5+,IE5+,MZ,PX,FB,CH,CA,SF,GA,KQ3+,OP7+,KM', | |
| 152 | - 'css1' => 'NS4+,IE4+,MZ,PX,FB,CH,CA,SF,GA,KQ,OP7+,KM', | |
| 153 | - 'iframes' => 'IE3+,NS5+,MZ,PX,FB,CH,CA,SF,GA,KQ,OP7+,KM', | |
| 154 | - 'xml' => 'IE5+,NS5+,MZ,PX,FB,CH,CA,SF,GA,KQ,OP7+,KM', | |
| 155 | - 'dom' => 'IE5+,NS5+,MZ,PX,FB,CH,CA,SF,GA,KQ,OP7+,KM', | |
| 156 | - 'hdml' => '', | |
| 157 | - 'wml' => '' | |
| 158 | - ); | |
| 159 | - | |
| 160 | - var $_browser_quirks = array( | |
| 161 | - 'must_cache_forms' => 'NS,MZ,FB,PX', | |
| 162 | - 'avoid_popup_windows' => 'IE3,LI,LX', | |
| 163 | - 'cache_ssl_downloads' => 'IE', | |
| 164 | - 'break_disposition_header' => 'IE5.5', | |
| 165 | - 'empty_file_input_value' => 'KQ', | |
| 166 | - 'scrollbar_in_way' => 'IE6' | |
| 167 | - ); | |
| 168 | - | |
| 169 | - function phpSniff($UA='',$settings = true) | |
| 170 | - { // populate the HTTP_USER_AGENT string | |
| 171 | - // 20020425 :: rraymond | |
| 172 | - // routine for easier configuration of the client at runtime | |
| 173 | - if(is_array($settings)) { | |
| 174 | - $run = true; | |
| 175 | - extract($settings); | |
| 176 | - $this->_check_cookies = $check_cookies; | |
| 177 | - $this->_default_language = $default_language; | |
| 178 | - $this->_allow_masquerading = $allow_masquerading; | |
| 179 | - } else { | |
| 180 | - // for backwards compatibility with 2.0.x series | |
| 181 | - $run = $settings; | |
| 182 | - } | |
| 183 | - | |
| 184 | - // 20020425 :: besfred | |
| 185 | - if(empty($UA)) $UA = getenv('HTTP_USER_AGENT'); | |
| 186 | - if(empty($UA)) { | |
| 187 | - $pv = explode(".", PHP_VERSION); | |
| 188 | - $UA = ( $pv[0] > 3 && $pv[1] > 0 ) ? $_SERVER['HTTP_USER_AGENT'] : $HTTP_SERVER_VARS['HTTP_USER_AGENT']; | |
| 189 | - } | |
| 190 | - // 20020910 :: rraymond | |
| 191 | - if(empty($UA)) return false; | |
| 192 | - | |
| 193 | - $this->_set_browser('ua',$UA); | |
| 194 | - if($run) $this->init(); | |
| 195 | - } | |
| 196 | -} | |
| 197 | -?> | |
| 198 | 0 | \ No newline at end of file |
phpSniff/phpSniff.core.php deleted
| 1 | -<?php | |
| 2 | -/******************************************************************************* | |
| 3 | - $Id: phpSniff.core.php,v 1.16 2003/07/02 23:30:29 epsilon7 Exp $ | |
| 4 | - | |
| 5 | - phpSniff: HTTP_USER_AGENT Client Sniffer for PHP | |
| 6 | - Copyright (C) 2001 Roger Raymond ~ epsilon7@users.sourceforge.net | |
| 7 | - | |
| 8 | - This library is free software; you can redistribute it and/or | |
| 9 | - modify it under the terms of the GNU Lesser General Public | |
| 10 | - License as published by the Free Software Foundation; either | |
| 11 | - version 2.1 of the License, or (at your option) any later version. | |
| 12 | - | |
| 13 | - This library is distributed in the hope that it will be useful, | |
| 14 | - but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 16 | - Lesser General Public License for more details. | |
| 17 | - | |
| 18 | - You should have received a copy of the GNU Lesser General Public | |
| 19 | - License along with this library; if not, write to the Free Software | |
| 20 | - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 21 | -*******************************************************************************/ | |
| 22 | - | |
| 23 | -class phpSniff_core | |
| 24 | -{ // initialize some vars | |
| 25 | - var $_browser_info = array( | |
| 26 | - 'ua' => '', | |
| 27 | - 'browser' => 'Unknown', | |
| 28 | - 'version' => 0, | |
| 29 | - 'maj_ver' => 0, | |
| 30 | - 'min_ver' => 0, | |
| 31 | - 'letter_ver' => '', | |
| 32 | - 'javascript' => '0.0', | |
| 33 | - 'platform' => 'Unknown', | |
| 34 | - 'os' => 'Unknown', | |
| 35 | - 'ip' => 'Unknown', | |
| 36 | - 'cookies' => 'Unknown', // remains for backwards compatability | |
| 37 | - 'ss_cookies' => 'Unknown', | |
| 38 | - 'st_cookies' => 'Unknown', | |
| 39 | - 'language' => '', | |
| 40 | - 'long_name' => '', | |
| 41 | - 'gecko' => '', | |
| 42 | - 'gecko_ver' => '' | |
| 43 | - ); | |
| 44 | - | |
| 45 | - var $_feature_set = array( | |
| 46 | - 'html' => true, | |
| 47 | - 'images' => true, | |
| 48 | - 'frames' => true, | |
| 49 | - 'tables' => true, | |
| 50 | - 'java' => true, | |
| 51 | - 'plugins' => true, | |
| 52 | - 'iframes' => false, | |
| 53 | - 'css2' => false, | |
| 54 | - 'css1' => false, | |
| 55 | - 'xml' => false, | |
| 56 | - 'dom' => false, | |
| 57 | - 'wml' => false, | |
| 58 | - 'hdml' => false | |
| 59 | - ); | |
| 60 | - | |
| 61 | - var $_quirks = array( | |
| 62 | - 'must_cache_forms' => false, | |
| 63 | - 'avoid_popup_windows' => false, | |
| 64 | - 'cache_ssl_downloads' => false, | |
| 65 | - 'break_disposition_header' => false, | |
| 66 | - 'empty_file_input_value' => false, | |
| 67 | - 'scrollbar_in_way' => false | |
| 68 | - ); | |
| 69 | - | |
| 70 | - var $_get_languages_ran_once = false; | |
| 71 | - var $_browser_search_regex = '([a-z]+)([0-9]*)([0-9.]*)(up|dn|\+|\-)?'; | |
| 72 | - var $_language_search_regex = '([a-z-]{2,})'; | |
| 73 | - | |
| 74 | - /** | |
| 75 | - * init | |
| 76 | - * this method starts the madness | |
| 77 | - **/ | |
| 78 | - function init () | |
| 79 | - { | |
| 80 | - // collect the ip | |
| 81 | - $this->_get_ip(); | |
| 82 | - // run the cookie check routine first | |
| 83 | - // [note: method only runs if allowed] | |
| 84 | - $this->_test_cookies(); | |
| 85 | - // rip the user agent to pieces | |
| 86 | - $this->_get_browser_info(); | |
| 87 | - // gecko build | |
| 88 | - $this->_get_gecko(); | |
| 89 | - // look for other languages | |
| 90 | - $this->_get_languages(); | |
| 91 | - // establish the operating platform | |
| 92 | - $this->_get_os_info(); | |
| 93 | - // determine javascript version | |
| 94 | - $this->_get_javascript(); | |
| 95 | - // determine current feature set | |
| 96 | - $this->_get_features(); | |
| 97 | - // point out any quirks | |
| 98 | - $this->_get_quirks(); | |
| 99 | - } | |
| 100 | - | |
| 101 | - /** | |
| 102 | - * property | |
| 103 | - * @param $p property to return . optional (null returns entire array) | |
| 104 | - * @return array/string entire array or value of property | |
| 105 | - **/ | |
| 106 | - function property ($p=null) | |
| 107 | - { if($p==null) | |
| 108 | - { return $this->_browser_info; | |
| 109 | - } | |
| 110 | - else | |
| 111 | - { return $this->_browser_info[strtolower($p)]; | |
| 112 | - } | |
| 113 | - } | |
| 114 | - | |
| 115 | - /** | |
| 116 | - * get_property | |
| 117 | - * alias for property | |
| 118 | - **/ | |
| 119 | - function get_property ($p) | |
| 120 | - { return $this->property($p); | |
| 121 | - } | |
| 122 | - | |
| 123 | - /** | |
| 124 | - * is | |
| 125 | - * @param $s string search phrase format = l:lang;b:browser | |
| 126 | - * @return bool true on success | |
| 127 | - * ex: $client->is('b:OP5Up'); | |
| 128 | - **/ | |
| 129 | - function is ($s) | |
| 130 | - { // perform language search | |
| 131 | - if(preg_match('/l:'.$this->_language_search_regex.'/i',$s,$match)) | |
| 132 | - { if($match) return $this->_perform_language_search($match); | |
| 133 | - } | |
| 134 | - // perform browser search | |
| 135 | - elseif(preg_match('/b:'.$this->_browser_search_regex.'/i',$s,$match)) | |
| 136 | - { if($match) return $this->_perform_browser_search($match); | |
| 137 | - } | |
| 138 | - return false; | |
| 139 | - } | |
| 140 | - | |
| 141 | - /** | |
| 142 | - * browser_is | |
| 143 | - * @param $s string search phrase for browser | |
| 144 | - * @return bool true on success | |
| 145 | - * ex: $client->browser_is('OP5Up'); | |
| 146 | - **/ | |
| 147 | - function browser_is ($s) | |
| 148 | - { preg_match('/'.$this->_browser_search_regex.'/i',$s,$match); | |
| 149 | - if($match) return $this->_perform_browser_search($match); | |
| 150 | - } | |
| 151 | - | |
| 152 | - /** | |
| 153 | - * language_is | |
| 154 | - * @param $s string search phrase for language | |
| 155 | - * @return bool true on success | |
| 156 | - * ex: $client->language_is('en-US'); | |
| 157 | - **/ | |
| 158 | - function language_is ($s) | |
| 159 | - { preg_match('/'.$this->_language_search_regex.'/i',$s,$match); | |
| 160 | - if($match) return $this->_perform_language_search($match); | |
| 161 | - } | |
| 162 | - | |
| 163 | - /** | |
| 164 | - * has_feature | |
| 165 | - * @param $s string feature we're checking on | |
| 166 | - * @return bool true on success | |
| 167 | - * ex: $client->has_feature('html'); | |
| 168 | - **/ | |
| 169 | - function has_feature ($s) | |
| 170 | - { return $this->_feature_set[$s]; | |
| 171 | - } | |
| 172 | - | |
| 173 | - /** | |
| 174 | - * has_quirk | |
| 175 | - * @param $s string quirk we're looking for | |
| 176 | - * @return bool true on success | |
| 177 | - * ex: $client->has_quirk('avoid_popup_windows'); | |
| 178 | - **/ | |
| 179 | - function has_quirk ($s) | |
| 180 | - { return $this->_quirks[$s]; | |
| 181 | - } | |
| 182 | - | |
| 183 | - /** | |
| 184 | - * _perform_browser_search | |
| 185 | - * @param $data string what we're searching for | |
| 186 | - * @return bool true on success | |
| 187 | - * @private | |
| 188 | - **/ | |
| 189 | - function _perform_browser_search ($data) | |
| 190 | - { $search = array(); | |
| 191 | - $search['phrase'] = isset($data[0]) ? $data[0] : ''; | |
| 192 | - $search['name'] = isset($data[1]) ? strtolower($data[1]) : ''; | |
| 193 | - $search['maj_ver'] = isset($data[2]) ? $data[2] : ''; | |
| 194 | - $search['min_ver'] = isset($data[3]) ? $data[3] : ''; | |
| 195 | - $search['direction'] = isset($data[4]) ? strtolower($data[4]) : ''; | |
| 196 | - | |
| 197 | - $looking_for = $search['maj_ver'].$search['min_ver']; | |
| 198 | - if($search['name'] == 'aol' || $search['name'] == 'webtv') | |
| 199 | - { return stristr($this->_browser_info['ua'],$search['name']); | |
| 200 | - } | |
| 201 | - elseif($this->_browser_info['browser'] == $search['name']) | |
| 202 | - { $majv = $search['maj_ver'] ? $this->_browser_info['maj_ver'] : ''; | |
| 203 | - $minv = $search['min_ver'] ? $this->_browser_info['min_ver'] : ''; | |
| 204 | - $what_we_are = $majv.$minv; | |
| 205 | - if(($search['direction'] == 'up' || $search['direction'] == '+') | |
| 206 | - && ($what_we_are >= $looking_for)) | |
| 207 | - { return true; | |
| 208 | - } | |
| 209 | - elseif(($search['direction'] == 'dn' || $search['direction'] == '-') | |
| 210 | - && ($what_we_are <= $looking_for)) | |
| 211 | - { return true; | |
| 212 | - } | |
| 213 | - elseif($what_we_are == $looking_for) | |
| 214 | - { return true; | |
| 215 | - } | |
| 216 | - } | |
| 217 | - return false; | |
| 218 | - } | |
| 219 | - | |
| 220 | - function _perform_language_search ($data) | |
| 221 | - { // if we've not grabbed the languages, then do so. | |
| 222 | - $this->_get_languages(); | |
| 223 | - return stristr($this->_browser_info['language'],$data[1]); | |
| 224 | - } | |
| 225 | - | |
| 226 | - function _get_languages () | |
| 227 | - { // capture available languages and insert into container | |
| 228 | - if(!$this->_get_languages_ran_once) | |
| 229 | - { if($languages = getenv('HTTP_ACCEPT_LANGUAGE')) | |
| 230 | - { $languages = preg_replace('/(;q=[0-9]+.[0-9]+)/i','',$languages); | |
| 231 | - } | |
| 232 | - else | |
| 233 | - { $languages = $this->_default_language; | |
| 234 | - } | |
| 235 | - $this->_set_browser('language',$languages); | |
| 236 | - $this->_get_languages_ran_once = true; | |
| 237 | - } | |
| 238 | - } | |
| 239 | - | |
| 240 | - function _get_os_info () | |
| 241 | - { // regexes to use | |
| 242 | - $regex_windows = '/([^dar]win[dows]*)[\s]?([0-9a-z]*)[\w\s]?([a-z0-9.]*)/i'; | |
| 243 | - $regex_mac = '/(68[k0]{1,3})|(ppc mac os x)|([p\S]{1,5}pc)|(darwin)/i'; | |
| 244 | - $regex_os2 = '/os\/2|ibm-webexplorer/i'; | |
| 245 | - $regex_sunos = '/(sun|i86)[os\s]*([0-9]*)/i'; | |
| 246 | - $regex_irix = '/(irix)[\s]*([0-9]*)/i'; | |
| 247 | - $regex_hpux = '/(hp-ux)[\s]*([0-9]*)/i'; | |
| 248 | - $regex_aix = '/aix([0-9]*)/i'; | |
| 249 | - $regex_dec = '/dec|osfl|alphaserver|ultrix|alphastation/i'; | |
| 250 | - $regex_vms = '/vax|openvms/i'; | |
| 251 | - $regex_sco = '/sco|unix_sv/i'; | |
| 252 | - $regex_linux = '/x11|inux/i'; | |
| 253 | - $regex_bsd = '/(free)?(bsd)/i'; | |
| 254 | - $regex_amiga = '/amiga[os]?/i'; | |
| 255 | - | |
| 256 | - // look for Windows Box | |
| 257 | - if(preg_match_all($regex_windows,$this->_browser_info['ua'],$match)) | |
| 258 | - { /** Windows has some of the most ridiculous HTTP_USER_AGENT strings */ | |
| 259 | - //$match[1][count($match[0])-1]; | |
| 260 | - $v = $match[2][count($match[0])-1]; | |
| 261 | - $v2 = $match[3][count($match[0])-1]; | |
| 262 | - // Establish NT 5.1 as Windows XP | |
| 263 | - if(stristr($v,'NT') && $v2 == 5.1) $v = 'xp'; | |
| 264 | - // Establish NT 5.0 and Windows 2000 as win2k | |
| 265 | - elseif($v == '2000') $v = '2k'; | |
| 266 | - elseif(stristr($v,'NT') && $v2 == 5.0) $v = '2k'; | |
| 267 | - // Establish 9x 4.90 as Windows 98 | |
| 268 | - elseif(stristr($v,'9x') && $v2 == 4.9) $v = '98'; | |
| 269 | - // See if we're running windows 3.1 | |
| 270 | - elseif($v.$v2 == '16bit') $v = '31'; | |
| 271 | - // otherwise display as is (31,95,98,NT,ME,XP) | |
| 272 | - else $v .= $v2; | |
| 273 | - // update browser info container array | |
| 274 | - if(empty($v)) $v = 'win'; | |
| 275 | - $this->_set_browser('os',strtolower($v)); | |
| 276 | - $this->_set_browser('platform','win'); | |
| 277 | - } | |
| 278 | - // look for amiga OS | |
| 279 | - elseif(preg_match($regex_amiga,$this->_browser_info['ua'],$match)) | |
| 280 | - { $this->_set_browser('platform','amiga'); | |
| 281 | - if(stristr($this->_browser_info['ua'],'morphos')) { | |
| 282 | - // checking for MorphOS | |
| 283 | - $this->_set_browser('os','morphos'); | |
| 284 | - } elseif(stristr($this->_browser_info['ua'],'mc680x0')) { | |
| 285 | - // checking for MC680x0 | |
| 286 | - $this->_set_browser('os','mc680x0'); | |
| 287 | - } elseif(stristr($this->_browser_info['ua'],'ppc')) { | |
| 288 | - // checking for PPC | |
| 289 | - $this->_set_browser('os','ppc'); | |
| 290 | - } elseif(preg_match('/(AmigaOS [\.1-9]?)/i',$this->_browser_info['ua'],$match)) { | |
| 291 | - // checking for AmigaOS version string | |
| 292 | - $this->_set_browser('os',$match[1]); | |
| 293 | - } | |
| 294 | - } | |
| 295 | - // look for OS2 | |
| 296 | - elseif( preg_match($regex_os2,$this->_browser_info['ua'])) | |
| 297 | - { $this->_set_browser('os','os2'); | |
| 298 | - $this->_set_browser('platform','os2'); | |
| 299 | - } | |
| 300 | - // look for mac | |
| 301 | - // sets: platform = mac ; os = 68k or ppc | |
| 302 | - elseif( preg_match($regex_mac,$this->_browser_info['ua'],$match) ) | |
| 303 | - { $this->_set_browser('platform','mac'); | |
| 304 | - $os = !empty($match[1]) ? '68k' : ''; | |
| 305 | - $os = !empty($match[2]) ? 'osx' : $os; | |
| 306 | - $os = !empty($match[3]) ? 'ppc' : $os; | |
| 307 | - $os = !empty($match[4]) ? 'osx' : $os; | |
| 308 | - $this->_set_browser('os',$os); | |
| 309 | - } | |
| 310 | - // look for *nix boxes | |
| 311 | - // sunos sets: platform = *nix ; os = sun|sun4|sun5|suni86 | |
| 312 | - elseif(preg_match($regex_sunos,$this->_browser_info['ua'],$match)) | |
| 313 | - { $this->_set_browser('platform','*nix'); | |
| 314 | - if(!stristr('sun',$match[1])) $match[1] = 'sun'.$match[1]; | |
| 315 | - $this->_set_browser('os',$match[1].$match[2]); | |
| 316 | - } | |
| 317 | - // irix sets: platform = *nix ; os = irix|irix5|irix6|... | |
| 318 | - elseif(preg_match($regex_irix,$this->_browser_info['ua'],$match)) | |
| 319 | - { $this->_set_browser('platform','*nix'); | |
| 320 | - $this->_set_browser('os',$match[1].$match[2]); | |
| 321 | - } | |
| 322 | - // hp-ux sets: platform = *nix ; os = hpux9|hpux10|... | |
| 323 | - elseif(preg_match($regex_hpux,$this->_browser_info['ua'],$match)) | |
| 324 | - { $this->_set_browser('platform','*nix'); | |
| 325 | - $match[1] = str_replace('-','',$match[1]); | |
| 326 | - $match[2] = (int) $match[2]; | |
| 327 | - $this->_set_browser('os',$match[1].$match[2]); | |
| 328 | - } | |
| 329 | - // aix sets: platform = *nix ; os = aix|aix1|aix2|aix3|... | |
| 330 | - elseif(preg_match($regex_aix,$this->_browser_info['ua'],$match)) | |
| 331 | - { $this->_set_browser('platform','*nix'); | |
| 332 | - $this->_set_browser('os','aix'.$match[1]); | |
| 333 | - } | |
| 334 | - // dec sets: platform = *nix ; os = dec | |
| 335 | - elseif(preg_match($regex_dec,$this->_browser_info['ua'],$match)) | |
| 336 | - { $this->_set_browser('platform','*nix'); | |
| 337 | - $this->_set_browser('os','dec'); | |
| 338 | - } | |
| 339 | - // vms sets: platform = *nix ; os = vms | |
| 340 | - elseif(preg_match($regex_vms,$this->_browser_info['ua'],$match)) | |
| 341 | - { $this->_set_browser('platform','*nix'); | |
| 342 | - $this->_set_browser('os','vms'); | |
| 343 | - } | |
| 344 | - // sco sets: platform = *nix ; os = sco | |
| 345 | - elseif(preg_match($regex_sco,$this->_browser_info['ua'],$match)) | |
| 346 | - { $this->_set_browser('platform','*nix'); | |
| 347 | - $this->_set_browser('os','sco'); | |
| 348 | - } | |
| 349 | - // unixware sets: platform = *nix ; os = unixware | |
| 350 | - elseif(stristr($this->_browser_info['ua'],'unix_system_v')) | |
| 351 | - { $this->_set_browser('platform','*nix'); | |
| 352 | - $this->_set_browser('os','unixware'); | |
| 353 | - } | |
| 354 | - // mpras sets: platform = *nix ; os = mpras | |
| 355 | - elseif(stristr($this->_browser_info['ua'],'ncr')) | |
| 356 | - { $this->_set_browser('platform','*nix'); | |
| 357 | - $this->_set_browser('os','mpras'); | |
| 358 | - } | |
| 359 | - // reliant sets: platform = *nix ; os = reliant | |
| 360 | - elseif(stristr($this->_browser_info['ua'],'reliantunix')) | |
| 361 | - { $this->_set_browser('platform','*nix'); | |
| 362 | - $this->_set_browser('os','reliant'); | |
| 363 | - } | |
| 364 | - // sinix sets: platform = *nix ; os = sinix | |
| 365 | - elseif(stristr($this->_browser_info['ua'],'sinix')) | |
| 366 | - { $this->_set_browser('platform','*nix'); | |
| 367 | - $this->_set_browser('os','sinix'); | |
| 368 | - } | |
| 369 | - // bsd sets: platform = *nix ; os = bsd|freebsd | |
| 370 | - elseif(preg_match($regex_bsd,$this->_browser_info['ua'],$match)) | |
| 371 | - { $this->_set_browser('platform','*nix'); | |
| 372 | - $this->_set_browser('os',$match[1].$match[2]); | |
| 373 | - } | |
| 374 | - // last one to look for | |
| 375 | - // linux sets: platform = *nix ; os = linux | |
| 376 | - elseif(preg_match($regex_linux,$this->_browser_info['ua'],$match)) | |
| 377 | - { $this->_set_browser('platform','*nix'); | |
| 378 | - $this->_set_browser('os','linux'); | |
| 379 | - } | |
| 380 | - } | |
| 381 | - | |
| 382 | - function _get_browser_info () | |
| 383 | - { $this->_build_regex(); | |
| 384 | - if(preg_match_all($this->_browser_regex,$this->_browser_info['ua'],$results)) | |
| 385 | - { // get the position of the last browser found | |
| 386 | - $count = count($results[0])-1; | |
| 387 | - // if we're allowing masquerading, revert to the next to last browser found | |
| 388 | - // if possible, otherwise stay put | |
| 389 | - if($this->_allow_masquerading && $count > 0) $count--; | |
| 390 | - // insert findings into the container | |
| 391 | - $this->_set_browser('browser',$this->_get_short_name($results[1][$count])); | |
| 392 | - $this->_set_browser('long_name',$results[1][$count]); | |
| 393 | - $this->_set_browser('maj_ver',$results[2][$count]); | |
| 394 | - // parse the minor version string and look for alpha chars | |
| 395 | - preg_match('/([.\0-9]+)?([\.a-z0-9]+)?/i',$results[3][$count],$match); | |
| 396 | - if(isset($match[1])) { | |
| 397 | - $this->_set_browser('min_ver',$match[1]); | |
| 398 | - } else { | |
| 399 | - $this->_set_browser('min_ver','.0'); | |
| 400 | - } | |
| 401 | - if(isset($match[2])) $this->_set_browser('letter_ver',$match[2]); | |
| 402 | - // insert findings into container | |
| 403 | - $this->_set_browser('version',$this->_browser_info['maj_ver'].$this->property('min_ver')); | |
| 404 | - } | |
| 405 | - } | |
| 406 | - | |
| 407 | - function _get_ip () | |
| 408 | - { if(getenv('HTTP_CLIENT_IP')) | |
| 409 | - { $ip = getenv('HTTP_CLIENT_IP'); | |
| 410 | - } | |
| 411 | - else | |
| 412 | - { $ip = getenv('REMOTE_ADDR'); | |
| 413 | - } | |
| 414 | - $this->_set_browser('ip',$ip); | |
| 415 | - } | |
| 416 | - | |
| 417 | - function _build_regex () | |
| 418 | - { $browsers = ''; | |
| 419 | - while(list($k,) = each($this->_browsers)) | |
| 420 | - { if(!empty($browsers)) $browsers .= "|"; | |
| 421 | - $browsers .= $k; | |
| 422 | - } | |
| 423 | - $version_string = "[\/\sa-z(]*([0-9]+)([\.0-9a-z]+)?"; | |
| 424 | - $this->_browser_regex = "/($browsers)$version_string/i"; | |
| 425 | - } | |
| 426 | - | |
| 427 | - function _get_short_name ($long_name) | |
| 428 | - { return $this->_browsers[strtolower($long_name)]; | |
| 429 | - } | |
| 430 | - | |
| 431 | - // medianes :: new test cookie routine | |
| 432 | - function _test_cookies() | |
| 433 | - { global $HTTP_COOKIE_VARS; | |
| 434 | - $cookies = array(); | |
| 435 | - if(isset($_COOKIE)) { | |
| 436 | - $cookies = $_COOKIE; | |
| 437 | - } elseif(isset($HTTP_COOKIE_VARS)) { | |
| 438 | - $cookies = $HTTP_COOKIE_VARS; | |
| 439 | - } | |
| 440 | - if($this->_check_cookies) | |
| 441 | - { $fp = @fopen($this->_temp_file_path.$this->property('ip'),'r'); | |
| 442 | - if(!$fp) | |
| 443 | - { $fp = @fopen($this->_temp_file_path.$this->property('ip'),'a'); | |
| 444 | - fclose($fp); | |
| 445 | - setcookie('phpSniff_session','ss',0,'/'); | |
| 446 | - setcookie('phpSniff_stored','st',time()+3600*24*365,'/'); | |
| 447 | - $QS=getenv('QUERY_STRING'); | |
| 448 | - $script_path=getenv('PATH_INFO')?getenv('PATH_INFO'):getenv('SCRIPT_NAME'); | |
| 449 | - if(is_integer($pos=strpos(strrev($script_path),"php.xedni/"))&&!$pos) { | |
| 450 | - $script_path=strrev(substr(strrev($script_path),9)); | |
| 451 | - } | |
| 452 | - $location='http://'.getenv('SERVER_NAME').$script_path.($QS==''?'':'?'.$QS); | |
| 453 | - header("Location: $location"); | |
| 454 | - exit; | |
| 455 | - } | |
| 456 | - else | |
| 457 | - { unlink($this->_temp_file_path.$this->property('ip')); | |
| 458 | - fclose($fp); | |
| 459 | - $this->_set_browser('ss_cookies',isset($cookies['phpSniff_session'])?'true':'false'); | |
| 460 | - $this->_set_browser('st_cookies',isset($cookies['phpSniff_stored'])?'true':'false'); | |
| 461 | - // delete the old cookies | |
| 462 | - setcookie('phpSniff_session','',0,'/'); | |
| 463 | - setcookie('phpSniff_stored','',0,'/'); | |
| 464 | - | |
| 465 | - } | |
| 466 | - } | |
| 467 | - } | |
| 468 | - | |
| 469 | - function _get_javascript() | |
| 470 | - { $set=false; | |
| 471 | - // see if we have any matches | |
| 472 | - while(list($version,$browser) = each($this->_javascript_versions)) | |
| 473 | - { $browser = explode(',',$browser); | |
| 474 | - while(list(,$search) = each($browser)) | |
| 475 | - { if($this->is('b:'.$search)) | |
| 476 | - { $this->_set_browser('javascript',$version); | |
| 477 | - $set = true; | |
| 478 | - break; | |
| 479 | - } | |
| 480 | - } | |
| 481 | - if($set) break; | |
| 482 | - } | |
| 483 | - } | |
| 484 | - | |
| 485 | - function _get_features () | |
| 486 | - { while(list($feature,$browser) = each($this->_browser_features)) | |
| 487 | - { $browser = explode(',',$browser); | |
| 488 | - while(list(,$search) = each($browser)) | |
| 489 | - { if($this->browser_is($search)) | |
| 490 | - { $this->_set_feature($feature); | |
| 491 | - break; | |
| 492 | - } | |
| 493 | - } | |
| 494 | - } | |
| 495 | - } | |
| 496 | - | |
| 497 | - function _get_quirks () | |
| 498 | - { while(list($quirk,$browser) = each($this->_browser_quirks)) | |
| 499 | - { $browser = explode(',',$browser); | |
| 500 | - while(list(,$search) = each($browser)) | |
| 501 | - { if($this->browser_is($search)) | |
| 502 | - { $this->_set_quirk($quirk); | |
| 503 | - break; | |
| 504 | - } | |
| 505 | - } | |
| 506 | - } | |
| 507 | - } | |
| 508 | - | |
| 509 | - function _get_gecko () | |
| 510 | - { if(preg_match('/gecko\/([0-9]+)/i',$this->property('ua'),$match)) | |
| 511 | - { $this->_set_browser('gecko',$match[1]); | |
| 512 | - if (preg_match('/rv[: ]?([0-9a-z.+]+)/i',$this->property('ua'),$mozv)) { | |
| 513 | - // mozilla release | |
| 514 | - $this->_set_browser('gecko_ver',$mozv[1]); | |
| 515 | - } elseif (preg_match('/(m[0-9]+)/i',$this->property('ua'),$mozv)) { | |
| 516 | - // mozilla milestone version | |
| 517 | - $this->_set_browser('gecko_ver',$mozv[1]); | |
| 518 | - } | |
| 519 | - // if this is a mozilla browser, get the rv: information | |
| 520 | - if($this->browser_is($this->_get_short_name('mozilla'))) { | |
| 521 | - if(preg_match('/([0-9]+)([\.0-9]+)([a-z0-9+]?)/i',$mozv[1],$match)) { | |
| 522 | - $this->_set_browser('version',$mozv[1]); | |
| 523 | - $this->_set_browser('maj_ver',$match[1]); | |
| 524 | - $this->_set_browser('min_ver',$match[2]); | |
| 525 | - $this->_set_browser('letter_ver',$match[3]); | |
| 526 | - } | |
| 527 | - } | |
| 528 | - } elseif($this->is('b:'.$this->_get_short_name('mozilla'))) { | |
| 529 | - // this is probably a netscape browser or compatible | |
| 530 | - $this->_set_browser('long_name','netscape'); | |
| 531 | - $this->_set_browser('browser',$this->_get_short_name('netscape')); | |
| 532 | - } | |
| 533 | - } | |
| 534 | - | |
| 535 | - function _set_browser ($k,$v) | |
| 536 | - { $this->_browser_info[strtolower($k)] = strtolower($v); | |
| 537 | - } | |
| 538 | - | |
| 539 | - function _set_feature ($k) | |
| 540 | - { $this->_feature_set[strtolower($k)] = !$this->_feature_set[strtolower($k)]; | |
| 541 | - } | |
| 542 | - | |
| 543 | - function _set_quirk ($k) | |
| 544 | - { $this->_quirks[strtolower($k)] = true; | |
| 545 | - } | |
| 546 | -} | |
| 547 | -?> | |
| 548 | 0 | \ No newline at end of file |
phpSniff/phpTimer.class.php deleted
| 1 | -<?php | |
| 2 | -/******************************************************************************* | |
| 3 | - phpTimer: A simple script to time script execution | |
| 4 | - Copyright (C) 2001 Roger Raymond ~ epsilon7@users.sourceforge.net | |
| 5 | - | |
| 6 | - This library is free software; you can redistribute it and/or | |
| 7 | - modify it under the terms of the GNU Lesser General Public | |
| 8 | - License as published by the Free Software Foundation; either | |
| 9 | - version 2.1 of the License, or (at your option) any later version. | |
| 10 | - | |
| 11 | - This library is distributed in the hope that it will be useful, | |
| 12 | - but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 14 | - Lesser General Public License for more details. | |
| 15 | - | |
| 16 | - You should have received a copy of the GNU Lesser General Public | |
| 17 | - License along with this library; if not, write to the Free Software | |
| 18 | - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 19 | -*******************************************************************************/ | |
| 20 | - | |
| 21 | -if(!defined('_PHP_TIMER_INCLUDED')) define('_PHP_TIMER_INCLUDED',1); | |
| 22 | -class phpTimer { | |
| 23 | - | |
| 24 | -function phpTimer () | |
| 25 | -{ $this->_version = '0.1'; | |
| 26 | - $this->_enabled = true; | |
| 27 | -} | |
| 28 | - | |
| 29 | -function start ($name = 'default') | |
| 30 | -{ if($this->_enabled) | |
| 31 | - { $this->_timing_start_times[$name] = explode(' ', microtime()); | |
| 32 | - } | |
| 33 | -} | |
| 34 | - | |
| 35 | -function stop ($name = 'default') | |
| 36 | -{ if($this->_enabled) | |
| 37 | - { $this->_timing_stop_times[$name] = explode(' ', microtime()); | |
| 38 | - } | |
| 39 | -} | |
| 40 | - | |
| 41 | -function get_current ($name = 'default') | |
| 42 | -{ if($this->_enabled) | |
| 43 | - { if (!isset($this->_timing_start_times[$name])) | |
| 44 | - { return 0; | |
| 45 | - } | |
| 46 | - if (!isset($this->_timing_stop_times[$name])) | |
| 47 | - { $stop_time = explode(' ', microtime()); | |
| 48 | - } | |
| 49 | - else | |
| 50 | - { $stop_time = $this->_timing_stop_times[$name]; | |
| 51 | - } | |
| 52 | - // do the big numbers first so the small ones aren't lost | |
| 53 | - $current = $stop_time[1] - $this->_timing_start_times[$name][1]; | |
| 54 | - $current += $stop_time[0] - $this->_timing_start_times[$name][0]; | |
| 55 | - return sprintf("%.10f",$current); | |
| 56 | - } | |
| 57 | - else | |
| 58 | - { return 0; | |
| 59 | - } | |
| 60 | -} | |
| 61 | - | |
| 62 | -} | |
| 63 | 0 | \ No newline at end of file |
phpSniff/user_agent.inc deleted
| 1 | -<?php | |
| 2 | -/******************************************************************************* | |
| 3 | - $Id: user_agent.inc,v 1.15 2003/07/02 23:28:35 epsilon7 Exp $ | |
| 4 | - | |
| 5 | - user_agent.inc: an array containing browser HTTP_USER_AGENT values for testing | |
| 6 | - Copyright (C) 2001 Roger Raymond ~ epsilon7@users.sourceforge.net | |
| 7 | - | |
| 8 | - This library is free software; you can redistribute it and/or | |
| 9 | - modify it under the terms of the GNU Lesser General Public | |
| 10 | - License as published by the Free Software Foundation; either | |
| 11 | - version 2.1 of the License, or (at your option) any later version. | |
| 12 | - | |
| 13 | - This library is distributed in the hope that it will be useful, | |
| 14 | - but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 16 | - Lesser General Public License for more details. | |
| 17 | - | |
| 18 | - You should have received a copy of the GNU Lesser General Public | |
| 19 | - License along with this library; if not, write to the Free Software | |
| 20 | - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 21 | -*******************************************************************************/ | |
| 22 | -$user_agent = array( | |
| 23 | -'', | |
| 24 | -'===[ Gecko Based ]============================================================', | |
| 25 | -'Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/0', | |
| 26 | -'Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.0.1) Gecko/20021220 Chimera/0.6+', | |
| 27 | -'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021207 Phoenix/0.5', | |
| 28 | -'mozilla/5.0 (macintosh; u; ppc mac os x mach-o; en-us; rv:1.0.1) gecko/20030306 camino/0.7', | |
| 29 | -'mozilla/5.0 (x11; u; linux i686; en-us; rv:1.4b) gecko/20030527 firebird/0.6', | |
| 30 | -'', | |
| 31 | -'===[ Microsoft Internet Explorer ]============================================', | |
| 32 | -'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)', | |
| 33 | -'Mozilla/4.0 (compatible; MSIE 5.22; Mac_PowerPC)', | |
| 34 | -'Mozilla/4.0 (compatible; MSIE 5.16, Mac_PowerPC)', | |
| 35 | -'Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)', | |
| 36 | -'Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.0)', | |
| 37 | -'mozilla/4.0 (compatible; msie 6.0; windows nt 5.1; q312461)', | |
| 38 | -'mozilla/4.0 (compatible; msie 5.5; windows 98; win 9x 4.90)', | |
| 39 | -'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)', | |
| 40 | -'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)', | |
| 41 | -'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; HotBar 4.1.8.0; .NET CLR 1.0.3705)', | |
| 42 | -'', | |
| 43 | -'===[ Netscape ]===============================================================', | |
| 44 | -'mozilla/4.51 [ru] (Win98; u)', | |
| 45 | -'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0', | |
| 46 | -'Mozilla/4.78 [en] (Win98; U)', | |
| 47 | -'Mozilla/4.5 [en] (Win95; U)', | |
| 48 | -'Mozilla/4.5 (Macintosh; U; PPC)', | |
| 49 | -'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; m18) Gecko/20010131 Netscape6/6.01', | |
| 50 | -'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; m18) Gecko/20010131 Netscape/7.00', | |
| 51 | -'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0', | |
| 52 | -'', | |
| 53 | -'===[ Mozilla ]================================================================', | |
| 54 | -'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6+)', | |
| 55 | -'mozilla/5.0 (x11; u; linux i686; en-us; rv:1.0.0) gecko/20020623 debian/1.0.0-0.woody.1', | |
| 56 | -'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.2.1) Gecko/20021130', | |
| 57 | -'Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2.1) Gecko/20021130', | |
| 58 | -'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130', | |
| 59 | -'Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.1) Gecko/20020826', | |
| 60 | -'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.0) Gecko/20020529', | |
| 61 | -'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9+) Gecko/20010509', | |
| 62 | -'mozilla/5.0 (macintosh; u; darwin power macintosh; rv:0.9.9+) gecko/20020223', | |
| 63 | -'Mozilla/5.0 (X11; Linux i686; en-US; rv:1.0rc5; OBJR) gecko/20020223', | |
| 64 | -'', | |
| 65 | -'===[ Opera ]==================================================================', | |
| 66 | -'Opera/6.05 (Windows XP; U) [en]', | |
| 67 | -'Opera/5.11 (Windows 2000; U) [en]', | |
| 68 | -'Mozilla/5.0 (Windows XP; U) Opera 6.05 [en]', | |
| 69 | -'Mozilla/3.0 (compatible; Opera/3.0; Windows 95/NT4)', | |
| 70 | -'Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.05 [en]', | |
| 71 | -'Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 5.11 [en]', | |
| 72 | -'mozilla/4.0 (compatible; msie 5.0; linux 2.4.16 i686) opera 5.0 [en]', | |
| 73 | -'', | |
| 74 | -'===[ Konqueror ]==============================================================', | |
| 75 | -'Mozilla/5.0 (compatible; Konqueror/3.1-13; Linux)', | |
| 76 | -'Mozilla/5.0 (compatible; Konqueror/3.0.0-10; Linux)', | |
| 77 | -'mozilla/5.0 (compatible; konqueror/2.2.1; linux)', | |
| 78 | -'Mozilla/5.0 (compatible; Konqueror/3; Linux)', | |
| 79 | -'', | |
| 80 | -'===[ Safari ]=================================================================', | |
| 81 | -'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/48 (like Gecko) Safari/48', | |
| 82 | -'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/51 (like Gecko) Safari/51 ', | |
| 83 | -'', | |
| 84 | -'===[ Text Based ]=============================================================', | |
| 85 | -'Lynx/2.7 libwww-FM/2.14', | |
| 86 | -'Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6g', | |
| 87 | -'Links (2.1pre3; Linux 2.4.20 i686; 80x24)', | |
| 88 | -'', | |
| 89 | -'===[ Amiga ]=============================+++++================================', | |
| 90 | -'Mozilla/5.0 (AmigaOS MorphOS; en-US; rv 1.0) Gecko/20020616', | |
| 91 | -'Mozilla/3.01 (compatible; AmigaVoyager/2.95; AmigaOS/MC680x0)', | |
| 92 | -'Mozilla/6.0; (Spoofed by Amiga-AWeb/3.4APL)', | |
| 93 | -'IBrowse/1.12 (AmigaOS 3.1)', | |
| 94 | -'IBrowse/2.2 (AmigaOS 3.1)', | |
| 95 | -'IBrowse/2.3 (AmigaOS 3.5)', | |
| 96 | -'IBrowse/2.3 (AmigaOS 3.9)', | |
| 97 | -'IBrowse/2.2 (AmigaOS V45)', | |
| 98 | -'AmigaVoyager/3.2 (AmigaOS/MC680x0)', | |
| 99 | -'AmigaVoyager/3.3.122 (AmigaOS/MC680x0)', | |
| 100 | -'AmigaVoyager/3.3.122 (AmigaOS/PPC)', | |
| 101 | -'Amiga-AWeb/3.3', | |
| 102 | -'Amiga-AWeb/3.4', | |
| 103 | -'Amiga-AWeb/3.4APL', | |
| 104 | -'', | |
| 105 | -'===[ Other ]==================================================================', | |
| 106 | -'Mozilla/4.0 (compatible; MSIE 5.5; Mac_PowerPC; OmniWeb/4.0)', | |
| 107 | -'NCSA Mosaic/2.6b1 (X11;UNIX_SV 4.2MP R4000) libwww/2.12 modified', | |
| 108 | -'amaya/V4.3.2 libwww/5.3.1', | |
| 109 | -'mozilla/4.61 [en] (x11; u; ) - browsex (2.0.0 windows)' | |
| 110 | -); | |
| 111 | -?> | |
| 112 | 0 | \ No newline at end of file |