Skip to content

User Agent#

userAgent#

Generate a user agent.

echo $faker->userAgent();

// 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/5350 (KHTML, like Gecko) Chrome/37.0.806.0 Mobile Safari/5350'

chrome#

Generate a user agent that belongs to Google Chrome.

echo $faker->chrome();

// 'Mozilla/5.0 (Macintosh; PPC Mac OS X 10_8_1) AppleWebKit/5352 (KHTML, like Gecko) Chrome/40.0.848.0 Mobile Safari/5352'

firefox#

Generate a user agent that belongs to Mozilla Firefox.

echo $faker->firefox();

// 'Mozilla/5.0 (X11; Linux i686; rv:7.0) Gecko/20121220 Firefox/35.0'

safari#

Generate a user agent that belongs to Apple Safari.

echo $faker->safari();

// 'Mozilla/5.0 (Macintosh; PPC Mac OS X 10_8_3 rv:5.0; sl-SI) AppleWebKit/532.33.2 (KHTML, like Gecko) Version/5.0 Safari/532.33.2'

opera#

Generate a user agent that belongs to Opera.

echo $faker->opera();

// 'Opera/8.55 (Windows 95; en-US) Presto/2.9.286 Version/11.00'

internetExplorer#

Generate a user agent that belongs to Internet Explorer.

echo $faker->internetExplorer();

// 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 5.0; Trident/5.1)'

msedge#

Generate a user agent that belongs to Microsoft Ege.

echo $faker->msedge();

// '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'