Sometimes, we need certain things to be done but there are not APIs available, so what we do? we create our own.
I always emphasize that we need to use our imagination and be resourceful, the following code is just a basic example on how to accomplish that.
This class has a simple function, get info based on the IP and also perform a speed test, as you will see in the attached source code, I'm using several resources but packaging everything into a nice class.
Features:
- Get external IP, latitude and longitude, ISP, and more.
- Country information based on IP.
- Speed test.
You can modify, improve, extend this code as you wish.
Have fun.
I always emphasize that we need to use our imagination and be resourceful, the following code is just a basic example on how to accomplish that.
This class has a simple function, get info based on the IP and also perform a speed test, as you will see in the attached source code, I'm using several resources but packaging everything into a nice class.
Features:
- Get external IP, latitude and longitude, ISP, and more.
- Country information based on IP.
- Speed test.
You can modify, improve, extend this code as you wish.
Have fun.
Attachments
Last edited: