Integration Guide

Massive's Operator Identification Platform is a community powered database that allows website publishers to quickly determine a mobile visitors Country and/or Network Operator via a simple API
Usage Overview Please refer to the URL provided at signup for the actual Query URL

Query URL: http://api.werwar.com/SITE_ID
HTTP Post to the Query URL using the following name/value params
  1. ip = The users IP address you wish to verify
  2. userAgent = The users browser identifier
  3. type = (Optional) request partial data "CARRIER", "COUNTRY"

This query will return a reply in the format "CARRIER,COUNTRY"
From a non-mobile device, decktop computer, etc. you will get the reply "PC,ZZ", "PC,US", etc. or from a Mobile Device whose network is unknown you will get the reply "Mobile,ZZ". If the Operator is known then the reply will include the Operator name as in "ATT,US", "O2,GB", "T-Mobile, DE", etc.

note: the Country Code: ZZ results from a misconfigured IP address, the 192.168.1.0 block is a private block and a server should not be sending that as its public IP.

Country Codes follow the ISO 3166 2-character convention http://www.theodora.com/country_digraphs.html
Naming Conventions The Operator T-Mobile operates in multiple countries but the name of the Carrier is always "T-Mobile" and then only the country will change, e.g. T-Mobile Germany is "T-Mobile,DE" likewise T-Mobile USA is "T-Mobile,US"

In most cases this will be the full reply, we are including comments within the reply that replate to an Operator that may be called something different in a particular region, of when a user is accessing your site from a mobile broadband account... The notation is formatted as follows

Take the Operator Hutch 3G, also referred to as 3 or Three... so they are notated as "Three (3)"

Likewise Swisscom has the following connections "Swisscom" and "Swisscom (ADSL)"

Vodafone users going through the Novarra transcoder will appear as "Vodafone (via Novarra)"

For users going through the Operator Indostat, We can't currently determine which network they are on, the post-paid or the pre-paid, so they appear as "Indosat (Mentari/IM3)"

The Indian Operator Bharti appears as both "Bharti Airtel" and "Bharti Tele-Ventures"

Currently the notation "ADSL" is used to identify a ISP connection that is an actual MNO/MVNO rather than random ISP's, thus AOL would never be listed, but companies like Swisscom and others that offer Internet access in addition to their cellular networks would be noted.

We would like to know if this notation in-line is helpful or not, this could be moved to a seperate section such that the return would be "CARRIER,COUNTRY,COMMENT"
Sample Code PHP fopen example: Post to the query API, get the reply as an array and then seperate out the elements for use within your app.
SAMPLE CODE

Alternativly you can pass a type to the API which will only return the one bit of information by using the param TYPE
  1. &type=country
  2. &type=carrier
  3. or no type param will return standard "COUNTRY,CARRIER" notation
Just return a users country
SAMPLE CODE

Or just a users carrier
SAMPLE CODE