N
N
Nikolai Petrov2016-01-23 01:39:38
Computer networks
Nikolai Petrov, 2016-01-23 01:39:38

Determine your mobile internet provider. Is it possible to?

It is necessary to determine the city of the user. For desktops with home Internet, I use ipgeobase.ru (for example, there is https://2ip.ru/ ). But if you log in from a mobile provider, then for small cities these IP identifiers often lie. They show the server of the nearest data center of the operator (serving the Internet traffic of regional cities), which is usually located in million cities. And of course the city is defined incorrectly.
I used mobiledetect.net in a couple of projects- but this thing determines the type of device, not the type of Internet connection. Has anyone faced a similar issue? The subject is not googled at all, or I am not formulating queries correctly (although I don’t seem to be a noob in Google). Can this be done with JS? Or with PHP? They threw the idea to collect IP ranges of mobile providers, but where to get such a base? There must be a solution .. maybe there are services that can prepare mobile providers?
UPD
There is such a thing:

echo $_SERVER['REMOTE_ADDR'];
echo gethostbyaddr($_SERVER['REMOTE_ADDR']);

on mobile internet gives the following result:
217.66.156.6
host-6-156-66-217.spbmts.ru

which is a logical continuation of the encroachment towards recognizing the type of provider. But how to find out all the mobile hosts of all providers? The same beeline has both mobile and home internet. Therefore, we cannot directly write to check for the presence of the "beeline" substring, we just need to collect hosts. It seems like in MSC and MTS there is a home Internet, which of course complicates the solution. How to be?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2016-01-23
@dimonchik2013

only empirically
armed https://apps.db.ripe.net/search/query.html#results... (not only IP, but also Vimpelcom , for example, you can search
in addition, you can tools.tracemyip.org/ search--isp/vimpelcom (but here, you need to understand that Android can also use Wi-Fi)
and forward
, usually C-class networks do not mix (well, routers are the same everywhere), i.e. in home and mobile there will be different ranges

D
D', 2016-01-23
@Denormalization

Mobile operators are easily identified by IP range.
Find any wap-click affiliate program, they usually have fresh lists of IP ranges for operators there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question