All Projects → zsxsoft → php-useragent

zsxsoft / php-useragent

Licence: other
A User-agent analyze project which written by PHP.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to php-useragent

Fetch Plus
🐕 Fetch+ is a convenient Fetch API replacement with first-class middleware support.
Stars: ✭ 116 (+39.76%)
Mutual labels:  user-agent
Mojo
✨ Mojolicious - Perl real-time web framework
Stars: ✭ 2,298 (+2668.67%)
Mutual labels:  user-agent
useragent-generator
Easily generate correct user-agent strings for popular browsers
Stars: ✭ 62 (-25.3%)
Mutual labels:  user-agent
Agent orange
Parse and process User Agents like a secret one
Stars: ✭ 127 (+53.01%)
Mutual labels:  user-agent
Browser
Do some browser detection with Ruby. Includes ActionController integration.
Stars: ✭ 2,263 (+2626.51%)
Mutual labels:  user-agent
User agent
Generator of User-Agent header
Stars: ✭ 227 (+173.49%)
Mutual labels:  user-agent
Crawler Detect
🕷 CrawlerDetect is a PHP class for detecting bots/crawlers/spiders via the user agent
Stars: ✭ 1,549 (+1766.27%)
Mutual labels:  user-agent
Vytal
Browser extension to spoof timezone, geolocation, locale and user agent.
Stars: ✭ 1,449 (+1645.78%)
Mutual labels:  user-agent
Device Detector Js
A precise user agent parser and device detector written in TypeScript
Stars: ✭ 193 (+132.53%)
Mutual labels:  user-agent
cloudflare-block-bad-bot-ruleset
🚦 Block malicious crawlers with Cloudflare Firewall Rules
Stars: ✭ 178 (+114.46%)
Mutual labels:  user-agent
Devicedetector.net
The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model.
Stars: ✭ 144 (+73.49%)
Mutual labels:  user-agent
Device Detector
The Universal Device Detection library will parse any User Agent and detect the browser, operating system, device used (desktop, tablet, mobile, tv, cars, console, etc.), brand and model.
Stars: ✭ 2,106 (+2437.35%)
Mutual labels:  user-agent
Ng Device Detector
Angular module to detect OS / Browser / Device
Stars: ✭ 243 (+192.77%)
Mutual labels:  user-agent
Parser Php
Browser sniffing gone too far — A useragent parser library for PHP
Stars: ✭ 1,626 (+1859.04%)
Mutual labels:  user-agent
crawlerdetect
Golang module to detect bots and crawlers via the user agent
Stars: ✭ 22 (-73.49%)
Mutual labels:  user-agent
Http request randomizer
Proxying Python Requests
Stars: ✭ 110 (+32.53%)
Mutual labels:  user-agent
Random User Agent
😎 Google chrome browser extension
Stars: ✭ 201 (+142.17%)
Mutual labels:  user-agent
browserslist-generator
A library that makes generating and validating Browserslists a breeze!
Stars: ✭ 77 (-7.23%)
Mutual labels:  user-agent
robots-parser
NodeJS robots.txt parser with support for wildcard (*) matching.
Stars: ✭ 117 (+40.96%)
Mutual labels:  user-agent
List Of User Agents
List of major web + mobile browser user agent strings. +1 Bonus script to scrape :)
Stars: ✭ 247 (+197.59%)
Mutual labels:  user-agent

PHP-UserAgent

Build Status Latest Stable Version Codacy Badge Packagist

A User-agent analyze project.

Try it

http://www.zsxsoft.com/php-useragent/test-my-useragent.php

JavaScript Edition

https://github.com/zsxsoft/useragent.js/

Contributors

zsx(http://www.zsxsoft.com)

The project is based on kyleabaker's "wp-useragent".

Supported Browsers/Platforms

Click here to see full list.

Tested Browsers: Amazon Silk / Android Webkit / Avant Browser / Comodo Dragon / curl / Firefox / Google Chrome / Internet Explorer / Microsoft Edge / Links / Lynx / Maxthon / MxNitro / Opera / QQBrowser / Safari SRWare Iron / Teleca Q7 / UC Browser / Vivaldi / W3M / wget / Yandex.Browser and so on..

OS: Android / Arch Linux / CentOS / Chrome OS / Debain / Fedora / FreeBSD / OSX / Red Hat / openSUSE / SymbianOS / Unix / Palm webOS / Windows 3.1 - 10 / Ubuntu / Linux and so on..

Devices: Xiaomi / BlackBerry / Nexus / HTC / Huawei / Kindle / Lenovo / LG / Motorola / Nokia / OnePlus / PlayStation / Samsung / Sony Xperia / ZTE / Ubuntu / Windows Phone / Apple Family and so on.

Example & API

<?php
/**
 * Test Useragent
 * @package php-useragent
 * @author zsx <[email protected]>
 * @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
 */
ini_set('display_errors', 'On');
error_reporting(E_ALL);
include './useragent.class.php';
$useragent = UserAgentFactory::analyze($_SERVER['HTTP_USER_AGENT']);
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>UserAgent</title>
</head>
<body>
    <h1>Test UserAgent</h1>
    <p>UserAgent: <?php echo $useragent->useragent; ?></p>
    <p>Platform Type: <?php echo $useragent->platform['type'] ?>
    <p>Device: <img src="<?php echo $useragent->device['image'] ?>"/><?php echo $useragent->device['title'] ?>(Brand: <?php echo $useragent->device['brand'] ?>, Model: <?php echo $useragent->device['model'] ?>) </p>
    <p>OS: <img src="<?php echo $useragent->os['image'] ?>"/><?php echo $useragent->os['title'] ?> (Name = <?php echo $useragent->os['name'] ?>, Version = <?php echo $useragent->os['version'] ?>)</p>
    <p>Browser: <img src="<?php echo $useragent->browser['image'] ?>"/><?php echo $useragent->browser['title'] ?> (Name = <?php echo $useragent->browser['name'] ?>, Version = <?php echo $useragent->browser['version'] ?>)</p>

</body>
</html>

##TODO

  • Move out RegExps like useragent.js from the PHP file

##License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].