Skip to content

lookup ISP and geo info (province, city etc) for mobile numbers in China

Notifications You must be signed in to change notification settings

forresty/mobinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MobInfo

lookup ISP and geo info (province, city etc) for mobile number in China

Installation

Add this line to your application's Gemfile:

gem 'mobinfo'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mobinfo

Usage

MobInfo.lookup('1862169')
# => {:province=>"上海", :city=>"上海", :postal_code=>"200000", :region_code=>"021", :isp=>"联通", :prefix=>1862169}

MobInfo.lookup(110)
# => nil

Credits

phone.dat, idea and algorithm from https://github.com/lovedboy/phone

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/forresty/mobinfo.

About

lookup ISP and geo info (province, city etc) for mobile numbers in China

Resources

Stars

Watchers

Forks

Packages

No packages published