N
N
Nikita Tratorov2017-06-22 13:10:02
PHP
Nikita Tratorov, 2017-06-22 13:10:02

How to check the balance of an MTS SIM card in PHP?

Dear colleagues!
Task : periodically automatically check the balance of the phone (corporate account) using a web server with PHP and Curl. To display the remainder in the interface of the internal application.
The links that exist today in Google and Yandex lead to resources that describe a simple solution to the problem, but none of them takes into account today's realities. MTS has changed the login principle and updated the pages so that the solutions presented on the network do not work.
If someone has already solved this problem, I beg you to share the implementation in PHP or Bash.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Volintsev, 2017-06-22
@copist

They have a Personal Account and a mobile application. There is a balance available.
A. Solution through the "Personal Account"
1. imitate a login to your personal account using curl, saving cookies and other tinsel
2. simulate a request to your personal account to the balance page using curl
most likely this page contains a balance
3. parse HTMl balance via XML or
regex https://monosnap.com/file/DLyZ0XcQfjQykKLxS4fVkJWP...
B. Solution via mobile application
1. Reduce traffic between android and server through proxy
2. Simulate the same packets
3. As a result, get package with balance

D
Dimonchik, 2017-06-22
@dimonchik2013

see here and about the application itself, there are codes somewhere

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question