seemsindie / msisdnparser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

To run rcp server

$ docker-compose up

The RPC server will run on:

localhost:1337

To run tests

$ cd ./app
$ phpunit

Example POST request body

{
	"jsonrpc": "2.0",
	"method": "parse",
	"params": ["+38111223435"],
	"id": "1"
}

Example response

{
    "jsonrpc": "2.0",
    "result": {
        "mno": "",
        "country": "RS",
        "countryDialingCode": 381,
        "number": "11223435",
        "isValid": true
    },
    "id": "1"
}

Example response from mobile number

{
    "jsonrpc": "2.0",
    "result": {
        "mno": "Telenor",
        "country": "RS",
        "countryDialingCode": 381,
        "number": "69445663",
        "isValid": true
    },
    "id": "1"
}

About


Languages

Language:PHP 100.0%