Hello. I would like to know, is it possible to determine the exact coordinates of the user who has visited the site without connecting third-party libraries and frameworks in PHP?
For me, this is the best solution at the moment, and most importantly, quite smart, because the geo-data is stored in binary form.
Available databases of countries, regions and cities in binary form. This project is still being actively developed, the bases are being kept up to date. There is a library for PHP (official), Python and Ruby. Since then, within the framework of the project, paid services ( remote REST API ) have appeared, but everything that was free remains so to this day .
This tool came across this year. Similarly, as with Sypex Geo data is stored in a binary. No database on the cities. There is a library in PHP.
need a base in which there is a match interval ip with countries
and then just write the code and verify the visitor's IP address with the base
Yes you can :) I did such a thing for cheating clickkanderov and other affiliate programs. Here is an example of work: http://kino-game.ru/s/ip
Archive, there are only 3 files: http://kino-game.ru/s/ip.rar
- ip.php (the script itself)
- geoipservice.wsdl (type library, 10Kb)
- geoipservice.asmx.xml (seemingly optional)
Use :) if everything works out, plus a turnip, I will be glad.
On js you can, using coordinates received from the browser.