Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
urls to get ip
#1
since i have been working on a module/command to get the user's current public IP address, as the world sees it, and web queries seem to be the way to go, i have done some searching and found several with easy output (mostly JSON or a raw IP) and decided to share my list.

connected  to 'https://api.ipify.org?format=json'
response = '{"ip":"10.20.30.40"}'
connected  to 'http://jsonip.com/'
response = '{"ip":"10.20.30.40","about":"/about","Pro!":"http://getjsonip.com"}'
connected  to 'http://icanhazip.com'
response = '10.20.30.40\n'
connected  to 'http://ipinfo.io/ip'
response = '10.20.30.40\n'
connected  to 'http://whatismyip.akamai.com/'
response = '10.20.30.40'
connected  to 'http://checkip.dyndns.org/'
response = '<html><head><title>Current IP Check</title></head><body>Current IP Address: 10.20.30.40</body></html>\r\n'
connected  to 'http://ipinfo.io/json'
response = '{\n  "ip": "10.20.30.40",\n  "hostname": "host.name",\n  "city": "",\n  "region": "",\n  "country": "XX",\n  "loc": "lat,long'\
connected  to 'https://ipinfo.io/json'
response = '{\n  "ip": "10.20.30.40",\n  "hostname": "host.name",\n  "city": "",\n  "region": "",\n  "country": "XX",\n  "loc": "lat,long'\
connected  to 'https://ifconfig.co/json'
response = '{"ip":"10.20.30.40","ip_decimal":169090600,"country":"Countyname","city":"Unknown","hostname":"host.name"}'
connected  to 'https://api.ipify.org?format=json'
response = '{"ip":"10.20.30.40"}'
edit 1: show each response format like a python string literal assignment
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
urls to get ip - by Skaperen - Dec-30-2016, 09:08 AM
RE: urls to get ip - by wavic - Dec-30-2016, 09:14 AM
RE: urls to get ip - by Skaperen - Dec-30-2016, 09:34 AM
RE: urls to get ip - by wavic - Dec-30-2016, 09:59 AM
RE: urls to get ip - by Skaperen - Dec-31-2016, 03:31 AM
RE: urls to get ip - by Ofnuts - Jan-01-2017, 11:58 PM
RE: urls to get ip - by Skaperen - Jan-02-2017, 03:31 AM
RE: urls to get ip - by snippsat - Jan-02-2017, 04:03 AM
RE: urls to get ip - by Skaperen - Jan-02-2017, 04:20 AM
RE: urls to get ip - by snippsat - Jan-02-2017, 04:33 AM
RE: urls to get ip - by wavic - Jan-02-2017, 09:12 AM
RE: urls to get ip - by Skaperen - Jan-03-2017, 05:27 AM
RE: urls to get ip - by wavic - Jan-03-2017, 05:48 AM
RE: urls to get ip - by Skaperen - Jan-03-2017, 07:11 AM
RE: urls to get ip - by wavic - Jan-03-2017, 08:12 AM
RE: urls to get ip - by Skaperen - Jan-03-2017, 10:38 AM
RE: urls to get ip - by Larz60+ - Jan-03-2017, 10:50 AM
RE: urls to get ip - by wavic - Jan-03-2017, 12:02 PM
RE: urls to get ip - by Skaperen - Jan-05-2017, 02:30 AM
RE: urls to get ip - by snippsat - Jan-03-2017, 03:16 PM
RE: urls to get ip - by Larz60+ - Jan-05-2017, 05:01 AM
RE: urls to get ip - by Skaperen - Jan-05-2017, 05:22 AM
RE: urls to get ip - by Larz60+ - Jan-05-2017, 10:37 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020