This is a script for detecting mobile devices (including tablets).
Detect by combined with: User-Agent, many lines in HTTP headers.
By the result, for mobile users it is possible to make a redirect to a certain page or another site.
Detect: