MoFuse API Documentation

Table of Contents

  1. General information
    1. About MoFuse API
  2. Mobile detection
    1. Mobile Detection
    2. iPhone Detection

About MoFuse API

The MoFuse API (and documentation) is a work in progress but we have released some features which we think can have an immediate impact. As of right now no API key is needed but as we release more features we may require developers to obtain an API key. Check back here for details in the future.

Back to Top

Mobile Detection

This is the same API call we use every day here at MoFuse. Quickly and easily detect a mobile phone browser and then you decide how to handle it from there.

This is a GET request to the URL: http://api.mofuse.com/?action=mobiledetect

Required properties: useragent (the useragent of the browser) Mozilla%2F5.0+%28Windows%3B+U%3B+Windows+NT+6.0%3B+en-US%3B+rv%3A1.8.1.12%29+Gecko%2F20080201+Firefox%2F2.0.0.12

Example GET request: http://api.mofuse.com/?action=mobiledetect&useragent=Mozilla%2F5.0+%28Windows%3B+U%3B+Windows+NT+6.0%3B+en-US%3B+rv%3A1.8.1.12%29+Gecko%2F20080201+Firefox%2F2.0.0.12

Response: Will return 1 if it is a mobile device or 0 if it is not a mobile device.

Example PHP call:

<?php
$mf_ua
=urlencode($_SERVER["HTTP_USER_AGENT"]);
$mf_url="http://api.mofuse.com/?action=mobiledetect&useragent=$mf_ua";
if (@
file_get_contents($mf_url)==1) {
    
$mobiledevice=1;
}
?>

Back to Top

iPhone Detection

This is the same API call we use every day here at MoFuse. Quickly and easily detect a mobile phone browser and then you decide how to handle it from there.

This is a GET request to the URL: http://api.mofuse.com/?action=iphonedetect

Required properties: useragent (the useragent of the browser) Mozilla%2F5.0+%28Windows%3B+U%3B+Windows+NT+6.0%3B+en-US%3B+rv%3A1.8.1.12%29+Gecko%2F20080201+Firefox%2F2.0.0.12

Example GET request: http://api.mofuse.com/?action=iphonedetect&useragent=Mozilla%2F5.0+%28Windows%3B+U%3B+Windows+NT+6.0%3B+en-US%3B+rv%3A1.8.1.12%29+Gecko%2F20080201+Firefox%2F2.0.0.12

Response: Will return 1 if the device is an iPhone and 0 if it is not.

Example PHP call:

<?php
$mf_ua
=urlencode($_SERVER["HTTP_USER_AGENT"]);
$mf_url="http://api.mofuse.com/?action=iphonedetect&useragent=$mf_ua";
if (@
file_get_contents($mf_url)==1) {
    
$iphone=1;
}
?>

Back to Top