- Prerequisites
- Premium Data
- Getting Started
- Summary
- Distributions
- 51Degrees.php Config
- Using the Detector
- Advanced Usage
- Accessing Metadata
- Image Optimiser
- Client Side Overrides
- Passing Properties To Client Side
- User Performance Monitoring
- Usage Sharing
- Automatic Data Updates
- Advanced Suggestions
- Troubleshooting
Getting Started - Version 3
Complete the following 4 steps in your PHP environment to start getting information about requesting mobile devices.
Step 1 - Download the Zip file from Sourceforge .
Step 2 - Unzip the file into a directory in your PHP server.
Step 3 - Then add the following code to your PHP page:
<?php require_once 'path/to/core/51Degrees.php' ; require_once 'path/to/core/51Degrees_usage.php' ; ?>
It is recommended for performance purposes that these lines are included after a session_start();
Step 4 - Get the details about the device that is accessing your site with code like this:
<?php if ( $_51d [ 'IsMobile' ] == TRUE ) { //Start coding for a mobile device here. } ?>
A working example website demonstrating the API can be found in the example directory.
Getting Started - Version 2
Complete the following 4 steps in your PHP environment to start getting information about requesting mobile devices.
Step 1 - Download the Zip file from Sourceforge .
Step 2 - Unzip the file into a directory of your choice within your project.
Step 3 - Then add the following code to your PHP page file:
<?php include_once ( 'path/to/51Degrees.mobi.php' ); include_once ( 'path/to/51Degrees.mobi.usage.php' ); ?>
(It is recommended for performance purposes that these lines are included after a session_start();)
Step 4 - Get the details about the device that is accessing your site with code like this:
<?php if ( $_51d [ 'IsMobile' ] == 'True' ) { //Start coding for a mobile device here. } ?>