Download the PHP package icemix/agent without Composer

On this page you can find all versions of the php package icemix/agent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package agent

Agent

Latest Stable Version Total Downloads Build Status Coverage Status

A PHP desktop/mobile user agent parser with support for Laravel, based on Mobile Detect with desktop support and additional functionality.

Installation

Install using composer:

Laravel (optional)

Add the service provider in config/app.php:

And add the Agent alias to config/app.php:

Basic Usage

Start by creating an Agent instance (or use the Agent Facade if you are using Laravel):

If you want to parse user agents other than the current request in CLI scripts for example, you can use the setUserAgent and setHttpHeaders methods:

All of the original Mobile Detect methods are still available, check out some original examples at https://github.com/serbanghita/Mobile-Detect/wiki/Code-examples

Is?

Check for a certain property in the user agent.

Magic is-method

Magic method that does the same as the previous is() method:

Mobile detection

Check for mobile device:

Match user agent

Search the user agent with a regular expression:

Additional Functionality

Accept languages

Get the browser's accept languages. Example:

Device name

Get the device name, if mobile. (iPhone, Nexus, AsusTablet, ...)

Operating system name

Get the operating system. (Ubuntu, Windows, OS X, ...)

Browser name

Get the browser name. (Chrome, IE, Safari, Firefox, ...)

Desktop detection

Check if the user is using a desktop device.

This checks if a user is not a mobile device, tablet or robot.

Phone detection

Check if the user is using a phone device.

Robot detection

Check if the user is a robot. This uses jaybizzle/crawler-detect to do the actual robot detection.

Robot name

Get the robot name.

Browser/platform version

MobileDetect recently added a version method that can get the version number for components. To get the browser or platform version you can use:

Note, the version method is still in beta, so it might not return the correct result.

License

Laravel User Agent is licensed under The MIT License (MIT).


All versions of agent with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
mobiledetect/mobiledetectlib Version ^4.8
jaybizzle/crawler-detect Version ^v1.2.120
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package icemix/agent contains the following files

Loading the files please wait ....