Using this technique, you can make your own IP Tracker.
At first, download python in your system.
Step 1 : Add Dependencies
import os
import urllib2
import json
OS Module : It will be used to interact with Operating System.
urllib2 Module : It will be used to handle "urls".
json(JavaScript Object Notation) Module : It will be used to store and exchange data.
Step 2 : Take Raw Input From User (Tageted IP)
ip = input("What is your target IP: ")
Step 3 : Enter URL, whose api we are using
url = "http://ip-api.com/json/"
Step 4 : Get HttpResponse in a variable
response=urllib2.urlopen(url+ip)
Step 5 : Get Data from response in a variable
data=response.read()
Step 6 : Get Data in JSON form in a variable
values=json.loads(data)
Step 7 : Showcase the Informations
print("IP: "+values["query"])
print("City: "+values["city"])
print("ISP: "+values["isp"])
print("Country: "+values["country"])
print("Region: "+values["region"])
print("Timezone: "+values["timezone"])
Full Code : Link
Top comments (2)
useless since it requeires thirdparty website.
thank u sir. i really appreciate your comment. but here i am trying to make people aware about python's library and interesting things people can do with python.