What's Covered
Tutorial illustrates how to use the API in a Web project. The following aspects are covered:
- Start a simple Perl server
- Create an instance of Provider
- Print a table of details relating to the data set
- Process a match for requests User-Agent HTTP header and print a table of properties
- Process a match for requests relevant headers and print a table of properties
Code and Explanation
[FiftyOneDegrees:ExampleCode(Url="https://raw.githubusercontent.com/51Degrees/Device-Detection/master/perl/examples/serverTrie.pl")]
Summary
In this tutorial you have seen how to use the detector in the context of a simple server to retrieve various properties from both a single User-Agent header and multiple HTTP headers. For a full list of properties and the data files they exist in please see the
Property Dictionary
.