Getting started example of using 51Degrees device detection. The example
shows how to:
- Fetch a pointer to the 51Degrees device detection provider instance.
This is instantiated on server startup and uses settings from php.ini.
$provider = FiftyOneDegreesPatternV3::provider_get();
- Produce a match for a single HTTP User-Agent header
my $match = $provider->getMatch($userAgent)
- Extract the value of the IsMobile property
This example assumes you have the 51Degrees PHP API installed correctly,
and have FiftyOneDegreesPatternV3.php in this directory.
For more examples see the tutorial pages.