PluginProbe ʕ •ᴥ•ʔ
GiveWP – Donation Plugin and Fundraising Platform / 3.3.1
GiveWP – Donation Plugin and Fundraising Platform v3.3.1
4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 2.31.0 2.31.1 2.32.0 2.33.0 2.33.1 2.33.2 2.33.3 2.33.4 2.33.5 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.2 2.6.3 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.8.0 2.8.1 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.1.2 3.10.0 3.11.0 3.12.0 3.12.1 3.12.2 3.12.3 3.13.0 3.14.0 3.14.1 3.14.2 3.15.0 3.15.1 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.16.5 3.17.0 3.17.1 3.17.2 3.18.0 3.19.0 3.19.1 3.19.2 3.19.3 3.19.4 3.2.0 3.2.1 3.2.2 3.20.0 3.21.0 3.21.1 3.22.0 3.22.1 3.22.2 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.5.1 3.6.0 3.6.1 3.6.2 3.7.0 3.8.0 3.9.0 4.0.0 4.1.0 4.1.1 4.10.0 4.10.1 4.11.0 4.12.0 4.13.0 4.13.1 4.13.2 4.14.0 4.14.1 4.14.2 4.14.3 4.14.4 4.14.5 4.14.6 4.2.0 4.2.1 4.3.0 4.3.1 4.3.2 4.4.0 4.5.0 4.6.1 4.7.0 4.7.1 4.8.0 4.8.1 4.9.0 trunk 1.9.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.2 2.11.3 2.12.0 2.12.1 2.12.2 2.12.3 2.13.0 2.13.1 2.13.2 2.13.3 2.13.4 2.14.0 2.15.0 2.16.0 2.16.1 2.17.0 2.17.1 2.17.3 2.18.0 2.18.1 2.19.1 2.19.2 2.19.3 2.19.4 2.19.5 2.19.6 2.19.7 2.19.8 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.20.0 2.20.1 2.20.2 2.21.0 2.21.1 2.21.2 2.21.3 2.21.4 2.22.0 2.22.1 2.22.2 2.22.3 2.23.0 2.23.1 2.23.2 2.24.0 2.24.1 2.24.2 2.25.0 2.25.1 2.25.2 2.25.3 2.26.0 2.27.0 2.27.1 2.27.2 2.27.3 2.28.0 2.29.0 2.29.1 2.29.2
give / vendor / vendor-prefixed / fakerphp / faker / src / Faker / Provider / UserAgent.php
give / vendor / vendor-prefixed / fakerphp / faker / src / Faker / Provider Last commit date
ar_EG 2 years ago ar_JO 2 years ago ar_SA 2 years ago at_AT 2 years ago bg_BG 2 years ago bn_BD 2 years ago cs_CZ 2 years ago da_DK 2 years ago de_AT 2 years ago de_CH 2 years ago de_DE 2 years ago el_CY 2 years ago el_GR 2 years ago en_AU 2 years ago en_CA 2 years ago en_GB 2 years ago en_HK 2 years ago en_IN 2 years ago en_NG 2 years ago en_NZ 2 years ago en_PH 2 years ago en_SG 2 years ago en_UG 2 years ago en_US 2 years ago en_ZA 2 years ago es_AR 2 years ago es_ES 2 years ago es_PE 2 years ago es_VE 2 years ago et_EE 2 years ago fa_IR 2 years ago fi_FI 2 years ago fr_BE 2 years ago fr_CA 2 years ago fr_CH 2 years ago fr_FR 2 years ago he_IL 2 years ago hr_HR 2 years ago hu_HU 2 years ago hy_AM 2 years ago id_ID 2 years ago is_IS 2 years ago it_CH 2 years ago it_IT 2 years ago ja_JP 2 years ago ka_GE 2 years ago kk_KZ 2 years ago ko_KR 2 years ago lt_LT 2 years ago lv_LV 2 years ago me_ME 2 years ago mn_MN 2 years ago ms_MY 2 years ago nb_NO 2 years ago ne_NP 2 years ago nl_BE 2 years ago nl_NL 2 years ago pl_PL 2 years ago pt_BR 2 years ago pt_PT 2 years ago ro_MD 2 years ago ro_RO 2 years ago ru_RU 2 years ago sk_SK 2 years ago sl_SI 2 years ago sr_Cyrl_RS 2 years ago sr_Latn_RS 2 years ago sr_RS 2 years ago sv_SE 2 years ago th_TH 2 years ago tr_TR 2 years ago uk_UA 2 years ago vi_VN 2 years ago zh_CN 2 years ago zh_TW 2 years ago Address.php 2 years ago Barcode.php 2 years ago Base.php 2 years ago Biased.php 2 years ago Color.php 2 years ago Company.php 2 years ago DateTime.php 2 years ago File.php 2 years ago HtmlLorem.php 2 years ago Image.php 2 years ago Internet.php 2 years ago Lorem.php 2 years ago Medical.php 2 years ago Miscellaneous.php 2 years ago Payment.php 2 years ago Person.php 2 years ago PhoneNumber.php 2 years ago Text.php 2 years ago UserAgent.php 2 years ago Uuid.php 2 years ago
UserAgent.php
226 lines
1 <?php
2 /**
3 * @license MIT
4 *
5 * Modified by impress-org on 23-January-2024 using Strauss.
6 * @see https://github.com/BrianHenryIE/strauss
7 */
8
9 namespace Give\Vendors\Faker\Provider;
10
11 class UserAgent extends Base
12 {
13 protected static $userAgents = ['firefox', 'chrome', 'internetExplorer', 'opera', 'safari', 'msedge'];
14
15 protected static $windowsPlatformTokens = [
16 'Windows NT 6.2', 'Windows NT 6.1', 'Windows NT 6.0', 'Windows NT 5.2', 'Windows NT 5.1',
17 'Windows NT 5.01', 'Windows NT 5.0', 'Windows NT 4.0', 'Windows 98; Win 9x 4.90', 'Windows 98',
18 'Windows 95', 'Windows CE',
19 ];
20
21 /**
22 * Possible processors on Linux
23 */
24 protected static $linuxProcessor = ['i686', 'x86_64'];
25
26 /**
27 * Mac processors (it also added U;)
28 */
29 protected static $macProcessor = ['Intel', 'PPC', 'U; Intel', 'U; PPC'];
30
31 /**
32 * Add as many languages as you like.
33 */
34 protected static $lang = ['en-US', 'sl-SI', 'nl-NL'];
35
36 /**
37 * Generate mac processor
38 *
39 * @return string
40 */
41 public static function macProcessor()
42 {
43 return static::randomElement(static::$macProcessor);
44 }
45
46 /**
47 * Generate linux processor
48 *
49 * @return string
50 */
51 public static function linuxProcessor()
52 {
53 return static::randomElement(static::$linuxProcessor);
54 }
55
56 /**
57 * Generate a random user agent
58 *
59 * @example 'Mozilla/5.0 (Windows CE) AppleWebKit/5350 (KHTML, like Gecko) Chrome/13.0.888.0 Safari/5350'
60 *
61 * @return string
62 */
63 public static function userAgent()
64 {
65 $userAgentName = static::randomElement(static::$userAgents);
66
67 return static::$userAgentName();
68 }
69
70 /**
71 * Generate Chrome user agent
72 *
73 * @example 'Mozilla/5.0 (Macintosh; PPC Mac OS X 10_6_5) AppleWebKit/5312 (KHTML, like Gecko) Chrome/14.0.894.0 Safari/5312'
74 *
75 * @return string
76 */
77 public static function chrome()
78 {
79 $saf = self::numberBetween(531, 536) . self::numberBetween(0, 2);
80
81 $platforms = [
82 '(' . static::linuxPlatformToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Chrome/" . self::numberBetween(36, 40) . '.0.' . self::numberBetween(800, 899) . ".0 Mobile Safari/$saf",
83 '(' . static::windowsPlatformToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Chrome/" . self::numberBetween(36, 40) . '.0.' . self::numberBetween(800, 899) . ".0 Mobile Safari/$saf",
84 '(' . static::macPlatformToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Chrome/" . self::numberBetween(36, 40) . '.0.' . self::numberBetween(800, 899) . ".0 Mobile Safari/$saf",
85 ];
86
87 return 'Mozilla/5.0 ' . static::randomElement($platforms);
88 }
89
90 /**
91 * Generate Edge user agent
92 *
93 * @example 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.82 Safari/537.36 Edg/99.0.1150.36'
94 *
95 * @return string
96 */
97 public static function msedge()
98 {
99 $saf = self::numberBetween(531, 537) . '.' . self::numberBetween(0, 2);
100 $chrv = self::numberBetween(79, 99) . '.0';
101
102 $platforms = [
103 '(' . static::windowsPlatformToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Chrome/$chrv" . '.' . self::numberBetween(4000, 4844) . '.' . self::numberBetween(10, 99) . " Safari/$saf Edg/$chrv" . self::numberBetween(1000, 1146) . '.' . self::numberBetween(0, 99),
104 '(' . static::macPlatformToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Chrome/$chrv" . '.' . self::numberBetween(4000, 4844) . '.' . self::numberBetween(10, 99) . " Safari/$saf Edg/$chrv" . self::numberBetween(1000, 1146) . '.' . self::numberBetween(0, 99),
105 '(' . static::linuxPlatformToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Chrome/$chrv" . '.' . self::numberBetween(4000, 4844) . '.' . self::numberBetween(10, 99) . " Safari/$saf EdgA/$chrv" . self::numberBetween(1000, 1146) . '.' . self::numberBetween(0, 99),
106 '(' . static::iosMobileToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Version/15.0 EdgiOS/$chrv" . self::numberBetween(1000, 1146) . '.' . self::numberBetween(0, 99) . " Mobile/15E148 Safari/$saf",
107 ];
108
109 return 'Mozilla/5.0 ' . static::randomElement($platforms);
110 }
111
112 /**
113 * Generate Firefox user agent
114 *
115 * @example 'Mozilla/5.0 (X11; Linuxi686; rv:7.0) Gecko/20101231 Firefox/3.6'
116 *
117 * @return string
118 */
119 public static function firefox()
120 {
121 $ver = 'Gecko/' . date('Ymd', self::numberBetween(strtotime('2010-1-1'), time())) . ' Firefox/' . self::numberBetween(35, 37) . '.0';
122
123 $platforms = [
124 '(' . static::windowsPlatformToken() . '; ' . static::randomElement(static::$lang) . '; rv:1.9.' . self::numberBetween(0, 2) . '.20) ' . $ver,
125 '(' . static::linuxPlatformToken() . '; rv:' . self::numberBetween(5, 7) . '.0) ' . $ver,
126 '(' . static::macPlatformToken() . ' rv:' . self::numberBetween(2, 6) . '.0) ' . $ver,
127 ];
128
129 return 'Mozilla/5.0 ' . static::randomElement($platforms);
130 }
131
132 /**
133 * Generate Safari user agent
134 *
135 * @example 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_7_1 rv:3.0; en-US) AppleWebKit/534.11.3 (KHTML, like Gecko) Version/4.0 Safari/534.11.3'
136 *
137 * @return string
138 */
139 public static function safari()
140 {
141 $saf = self::numberBetween(531, 535) . '.' . self::numberBetween(1, 50) . '.' . self::numberBetween(1, 7);
142
143 if (Miscellaneous::boolean()) {
144 $ver = self::numberBetween(4, 5) . '.' . self::numberBetween(0, 1);
145 } else {
146 $ver = self::numberBetween(4, 5) . '.0.' . self::numberBetween(1, 5);
147 }
148
149 $mobileDevices = [
150 'iPhone; CPU iPhone OS',
151 'iPad; CPU OS',
152 ];
153
154 $platforms = [
155 '(Windows; U; ' . static::windowsPlatformToken() . ") AppleWebKit/$saf (KHTML, like Gecko) Version/$ver Safari/$saf",
156 '(' . static::macPlatformToken() . ' rv:' . self::numberBetween(2, 6) . '.0; ' . static::randomElement(static::$lang) . ") AppleWebKit/$saf (KHTML, like Gecko) Version/$ver Safari/$saf",
157 '(' . static::randomElement($mobileDevices) . ' ' . self::numberBetween(7, 8) . '_' . self::numberBetween(0, 2) . '_' . self::numberBetween(1, 2) . ' like Mac OS X; ' . static::randomElement(static::$lang) . ") AppleWebKit/$saf (KHTML, like Gecko) Version/" . self::numberBetween(3, 4) . '.0.5 Mobile/8B' . self::numberBetween(111, 119) . " Safari/6$saf",
158 ];
159
160 return 'Mozilla/5.0 ' . static::randomElement($platforms);
161 }
162
163 /**
164 * Generate Opera user agent
165 *
166 * @example 'Opera/8.25 (Windows NT 5.1; en-US) Presto/2.9.188 Version/10.00'
167 *
168 * @return string
169 */
170 public static function opera()
171 {
172 $platforms = [
173 '(' . static::linuxPlatformToken() . '; ' . static::randomElement(static::$lang) . ') Presto/2.' . self::numberBetween(8, 12) . '.' . self::numberBetween(160, 355) . ' Version/' . self::numberBetween(10, 12) . '.00',
174 '(' . static::windowsPlatformToken() . '; ' . static::randomElement(static::$lang) . ') Presto/2.' . self::numberBetween(8, 12) . '.' . self::numberBetween(160, 355) . ' Version/' . self::numberBetween(10, 12) . '.00',
175 ];
176
177 return 'Opera/' . self::numberBetween(8, 9) . '.' . self::numberBetween(10, 99) . ' ' . static::randomElement($platforms);
178 }
179
180 /**
181 * Generate Internet Explorer user agent
182 *
183 * @example 'Mozilla/5.0 (compatible; MSIE 7.0; Windows 98; Win 9x 4.90; Trident/3.0)'
184 *
185 * @return string
186 */
187 public static function internetExplorer()
188 {
189 return 'Mozilla/5.0 (compatible; MSIE ' . self::numberBetween(5, 11) . '.0; ' . static::windowsPlatformToken() . '; Trident/' . self::numberBetween(3, 5) . '.' . self::numberBetween(0, 1) . ')';
190 }
191
192 /**
193 * @return string
194 */
195 public static function windowsPlatformToken()
196 {
197 return static::randomElement(static::$windowsPlatformTokens);
198 }
199
200 /**
201 * @return string
202 */
203 public static function macPlatformToken()
204 {
205 return 'Macintosh; ' . static::randomElement(static::$macProcessor) . ' Mac OS X 10_' . self::numberBetween(5, 8) . '_' . self::numberBetween(0, 9);
206 }
207
208 /**
209 * @return string
210 */
211 public static function iosMobileToken()
212 {
213 $iosVer = self::numberBetween(13, 15) . '_' . self::numberBetween(0, 2);
214
215 return 'iPhone; CPU iPhone OS ' . $iosVer . ' like Mac OS X';
216 }
217
218 /**
219 * @return string
220 */
221 public static function linuxPlatformToken()
222 {
223 return 'X11; Linux ' . static::randomElement(static::$linuxProcessor);
224 }
225 }
226