定制 fyre/useragent 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fyre/useragent

Composer 安装命令:

composer require fyre/useragent

包简介

A user agent library.

README 文档

README

FyreUserAgent is a free, open-source user agent library for PHP.

Table Of Contents

Installation

Using Composer

composer require fyre/useragent

In PHP:

use Fyre\Http\UserAgent;

Basic Usage

  • $agent is a string representing the user agent.
$userAgent = new UserAgent($agent);

Alternatively, you can use the createFromString method for easier chaining.

$userAgent = UserAgent::createFromString($agent);

Methods

Get Agent String

Get the user agent string.

$agent = $userAgent->getAgentString();

Get Browser

Get the browser.

$browser = $userAgent->getBrowser();

Get Mobile

Get the mobile.

$mobile = $userAgent->getMobile();

Get Platform

Get the platform.

$platform = $userAgent->getPlatform();

Get Robot

Get the robot.

$robot = $userAgent->getRobot();

Get Version

Get the browser version.

$version = $userAgent->getVersion();

Is Browser

Determine whether the user agent is a browser.

$isBrowser = $userAgent->isBrowser();

Is Mobile

Determine whether the user agent is a mobile.

$isMobile = $userAgent->isMobile();

Is Robot

Determine whether the user agent is a robot.

$isRobot = $userAgent->isRobot();

统计信息

  • 总下载量: 8.5k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-12-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固